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

You Might Also Like

📷 What to Know About Macro Photography — Why You Should Buy a Budget Motherboard

Friday, April 19, 2024

Also: How to Automatically Highlight Values in Excel, and More! How-To Geek Logo April 19, 2024 📩 Get expert reviews, the hottest deals, how-to's, breaking news, and more delivered directly to your

Is the wind going out of the AI sails?

Friday, April 19, 2024

Rippling vacuums up venture capital and Ramp bags more millions View this email online in your browser By Haje Jan Kamps Friday, April 19, 2024 Image Credits: Getty Images / Carol Yepes Welcome to

Llama 3 is out - Weekly News Roundup - Issue #463

Friday, April 19, 2024

Plus: brand-new, all-electric Atlas; AI Index Report 2024; Microsoft pitched GenAI tools to US military; Humane AI Pin reviews are in; debunking Devin; and more! ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏

Daily Coding Problem: Problem #1417 [Easy]

Friday, April 19, 2024

Daily Coding Problem Good morning! Here's your coding interview problem for today. This problem was asked by Wayfair. You are given a 2 x N board, and instructed to completely cover the board with

Charted | How Hard Is It to Get Into an Ivy League School? 🎓

Friday, April 19, 2024

We detail the admission rates and average annual cost for Ivy League schools, as well as the median SAT scores required to be accepted. View Online | Subscribe Presented by: Discover the motivations

Dark Matter & Tortured Poets

Friday, April 19, 2024

New music releases aren't what they used to be -- for good and bad. Dark Matter & Tortured Poets By MG Siegler • 19 Apr 2024 View in browser View in browser New music releases in 2024 are a

Impact of AI on Product Management

Friday, April 19, 2024

​ Impact of AI on Product Management The rise of the AI Product Manager. Product managers have always championed customer's needs. However, with AI, the job requires new technical and ethical

⚙️ Zuck has entered the chat(bot)

Friday, April 19, 2024

Plus: AI video's coming to mobile! ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌

Noonification: Just Made my First Dollar With My SaaS After Quitting my Job

Friday, April 19, 2024

Top Tech Content sent at Noon! Get Algolia: AI Search that understands How are you, @newsletterest1? 🪐 What's happening in tech this week: The Noonification by HackerNoon has got you covered with

From Not to Hot 🔥7 Practices to Land a Trending Story

Friday, April 19, 2024

Discover the Insider Secrets to Elevate Your Story's Success! 🚀 ͏ ‌  ͏ ‌  ͏ ‌  ͏ ‌  ͏ ‌  ͏ ‌  ͏ ‌  ͏ ‌ ͏ ‌  ͏ ‌  ͏ ‌  ͏ ‌  ͏ ‌  ͏ ‌  ͏ ‌  ͏ ‌ ͏ ‌  ͏ ‌  ͏ ‌  ͏ ‌  ͏ ‌  ͏ ‌  ͏ ‌