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
      38 of 102

      Two clues

      Snacks keep going missing, and it’s always the dog or the cat. Before any clue, it was the dog with chance base_chance. Each clue alone (crumbs on the dog’s bed, a muddy paw print, cat hair on the plate), starting from that same base, would make it the dog with chance clue_chances[i]. The clues are independent: each one is separate evidence. Write combine(base_chance, clue_chances): the chance it was the dog given all the clues.

      A snack went missing, and it was the dog or the cat: half the time it’s the dog. Each clue, on its own and from that same start, would make it 80% the dog. How likely was it the dog with both?

      chance it was the dog0%100%the missing snackcrumbs on the dog’s bedthe dog won’t look at youbefore any clue50%

      what should combine() say with both? that’s for you to work out

      Your functioncombine(base_chance, clue_chances)
      base_chancechance it was the dog before any cluee.g. 0.5
      clue_chanceschance it was the dog with each clue alone (same base)e.g. [0.8]
      returnsthe chance it was the dog with all the clues
      solution.pyLoading Python
      Sign in for an AI hint
      ← The rare disease testTwo for two →