PracHub
QuestionsCoachesLearningGuidesInterview Prep
|Home/Statistics & Math/Intuit

Calculate Precision, Recall, and F1

Last updated: Jun 15, 2026

Quick Overview

This Intuit Data Scientist technical-screen question tests your ability to compute confusion-matrix counts (TP, FP, TN, FN) and derive precision, recall, and F1 for the positive class from binary classification outputs. It also probes how to threshold confidence scores into predictions and how to handle zero-denominator edge cases.

  • medium
  • Intuit
  • Statistics & Math
  • Data Scientist

Calculate Precision, Recall, and F1

Company: Intuit

Role: Data Scientist

Category: Statistics & Math

Difficulty: medium

Interview Round: Technical Screen

##### Question You are given a list of binary classification outputs, where class `1` is the positive class. Each record contains: - `actual` (INT, `0` or `1`) - `predicted` (INT, `0` or `1`) - `confidence` (FLOAT, the model's confidence score for the positive class) Example record: `{"actual": 1, "predicted": 0, "confidence": 0.93}`. Using the provided `actual` and `predicted` labels, write Python or pseudocode that: 1. Computes the confusion-matrix counts for the positive class: `TP`, `FP`, `TN`, `FN`. 2. Calculates `precision`, `recall`, and the `F1 score` over the full dataset. 3. Explains how you would derive `predicted` from `confidence` if the interviewer asks you to apply a decision threshold instead of using the provided predicted labels, and how the metrics change as the threshold changes. 4. Handles edge cases where a denominator becomes zero (for example, no predicted positives or no actual positives).

Quick Answer: This Intuit Data Scientist technical-screen question tests your ability to compute confusion-matrix counts (TP, FP, TN, FN) and derive precision, recall, and F1 for the positive class from binary classification outputs. It also probes how to threshold confidence scores into predictions and how to handle zero-denominator edge cases.

Related Interview Questions

  • Choose the right test for proportions - Intuit (hard)
|Home/Statistics & Math/Intuit

Calculate Precision, Recall, and F1

Intuit logo
Intuit
Feb 10, 2026, 12:00 AM
mediumData ScientistTechnical ScreenStatistics & Math
8
0
Question

You are given a list of binary classification outputs, where class 1 is the positive class. Each record contains:

  • actual (INT, 0 or 1 )
  • predicted (INT, 0 or 1 )
  • confidence (FLOAT, the model's confidence score for the positive class)

Example record: {"actual": 1, "predicted": 0, "confidence": 0.93}.

Using the provided actual and predicted labels, write Python or pseudocode that:

  1. Computes the confusion-matrix counts for the positive class: TP , FP , TN , FN .
  2. Calculates precision , recall , and the F1 score over the full dataset.
  3. Explains how you would derive predicted from confidence if the interviewer asks you to apply a decision threshold instead of using the provided predicted labels, and how the metrics change as the threshold changes.
  4. Handles edge cases where a denominator becomes zero (for example, no predicted positives or no actual positives).
Loading comments...

Browse More Questions

More Statistics & Math•More Intuit•More Data Scientist•Intuit Data Scientist•Intuit Statistics & Math•Data Scientist Statistics & Math

Write your answer

Your first approved answer each day earns 20 XP.

Sign in to write your answer.
PracHub

Master your tech interviews with 8,500+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • AI Coding Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.