Spooky Sale: 10% off Premium yearly · $118.80 for the first year · until Nov 6Get it

Deep-ML
Learn
Problems1,200+ hands-on ML problemsLearning PathA guided route through the fundamentalsLabsInteractive labs on real techniquesProjectsBuild a GPT, an RL agent, CUDA kernelsCollectionsCurated problem sets and videosMathPen-and-paper math for MLIntuitionInvent the idea behind the formula yourselfPlaylistsYour own problem lists, shareableStudy AssistantAn AI teacher that knows your progress
Interview Prep
Compete
ContestsFresh problem sets, ranked liveLeaderboardWhere you stand, globallyBuddiesSolve with a friend: streaks, a weekly board, chat
Discuss
Deep-Path
Premium
      Intuition
      34 of 88

      The rare disease test

      Someone takes a test for a rare disease and it comes back positive. Write chance_sick(base_rate, catch_rate, false_alarm_rate): the chance they are actually sick. base_rate is the share of people who have it, catch_rate the chance a sick person tests positive, and false_alarm_rate the chance a healthy person tests positive anyway.

      base_rate: 1 in 1,000
      0.001
      catch_rate
      0.99
      false_alarm_rate
      0.01
      solution.pyLoading Python
      ← Is the bet worth it?Two clues →