Data Interview Qs - Surveying class cheaters

InterviewQs

Surveying class cheaters

Python Bayes' Theorem Binomial Distribution Algorithms PyMC3

Forward this email to a friend or colleague and challenge them to solve it.

Hi, 

Suppose you're working with a university trying to determine the number of students who cheated in a given class. Since you can't simply ask students whether or not they cheated (and expect to receive honest answers, even if you promise the survey is anonymous) you and the university have developed the following algorithm that will help determine what proportion of students cheated while retaining anonymity:

  • Each student privately flips a coin before being asked if they cheated in class
    • If the coin comes up heads, the student will answer honestly
    • If the coin comes up tails, the student will flip the coin once more, responding that "yes" they did cheat if it lands heads and that "no" they didn't cheat if it lands tails
  • The student will now have privacy, and the researchers should receive honest answers

Given this algorithm, suppose your professor surveyed 1000 students and 410 responded "Yes" that they did cheat in the class. Write a model that will produce the expected range of true cheaters out of the 1000 surveyed. Note that this question is more open-ended, so stating your assumptions and walking through your logic will be more important than your absolute answer.

Solution will be written in Python for premium users.



 

You’ve accumulated 308 questions since joining our email list. Create a premium account to access detailed solutions to each problem (including this one) + our new Case studies.


Was this email forwarded to you? You can join our list here to receive questions

How did you like today's question?

15411 Boischatel, Montreal, QC, H9H1Y7, Canada
Don't want to get these emails anymore? We'll forgive you if you unsubscribe

Older messages

Maximum sliding subarrays

Friday, June 17, 2022

Python, Data Structures, Arrays, Algorithms, InterviewQs Maximum sliding subarrays Python Data Structures Arrays Algorithms Forward this email to a friend or colleague and challenge them to solve it.

Logic behind the stationary distribution

Friday, June 17, 2022

Python, Stochastic Process, Markov Chains, Linear Algebra, InterviewQs Logic behind the stationary distribution Python Stochastic Process Markov Chains Linear Algebra Forward this email to a friend or

Consecutive increases in annual earnings

Monday, June 13, 2022

SQL, Database Querying, Window Function, Lead Function, InterviewQs Consecutive increases in annual earnings SQL Database Querying Window Function Lead Function Forward this email to a friend or

Growth rate of US States

Friday, June 10, 2022

Python, Pandas, Merging Dataframes, Data Structures, External Dataset, InterviewQs Growth rate of US States Python Pandas Merging Dataframes Data Structures External Dataset Forward this email to a

Class lecture scheduling

Wednesday, June 8, 2022

Python, Data Structures, Arrays, Algorithms, InterviewQs Class lecture scheduling Python Data Structures Arrays Algorithms Forward this email to a friend or colleague and challenge them to solve it. Hi

[Python Mastery] What does it mean to "master" Python?

Tuesday, July 5, 2022

Hey there, A couple of years ago I'd become quite interested in martial arts. Hours upon hours of watching "The Karate Kid" growing up must've taken their toll on me... And so, I

[PythonistaCafe] What makes PythonistaCafe different

Tuesday, July 5, 2022

Hey there, Mastering Python is *not* just about getting the books and courses to study—to be successful you also need a way to stay motivated and to grow your abilities in the long run. Many

Pirate Library Mirror: Preserving 7TB of books (that are not in Libgen) — and Why nobody ever wins the car at the mall (2018)

Monday, July 4, 2022

Issue #818 — Top 20 stories of July 05, 2022 Issue #818 — July 05, 2022 You receive this email because you are subscribed to Hacker News Digest. You can open it in the browser if you prefer. 1 Pirate

JSK Daily for Jul 4, 2022

Monday, July 4, 2022

JSK Daily for Jul 4, 2022 View this email in your browser A community curated daily e-mail of JavaScript news WebSockets vs. Server-Sent Events Over the years, the HTTP request-response model has been

Max Q - Capped

Monday, July 4, 2022

TechCrunch Newsletter TechCrunch logo Max Q logo By Aria Alamalhodaei Monday, July 04, 2022 Hello and welcome back to Max Q. I hope all my American readers had a restful Independence Day. In this issue

Top 3: StackOverflow asked 70,000 devs about Angular, a fictional interview with Seneca, and what makes a healthy engineering team

Monday, July 4, 2022

3 best articles I read this week ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌

Bytes: Like any good doggo, ESLint might be a little overbearing

Monday, July 4, 2022

Happy Fourth of July to those who celebrate and happy July 4th to those who don't. This week, we've got our special Bytes Cocktail recipe, our class action lawsuit Airbnb developers, and a

Daily Coding Problem: Problem #808 [Hard]

Monday, July 4, 2022

Daily Coding Problem Good morning! Here's your coding interview problem for today. This problem was asked by Palantir. Typically, an implementation of in-order traversal of a binary tree has O(h)

What to Do If You Drop Your Smartphone in the Ocean

Monday, July 4, 2022

Did You Know?: Easter Island, famous for its massive monumental statues called moai, is a special territory of Chile. Read in Browser Logo for How-To Geek July 4, 2022 Did You Know? Easter Island,

That’s nuts

Monday, July 4, 2022

One of the biggest struggles amongst people with a tight budget is coming to terms with how much is actually... Product Hunt Read in browser This newsletter is brought to you by This app shows you your