100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Exam (elaborations)

hw06 Study Guide

Rating
-
Sold
-
Pages
19
Grade
A
Uploaded on
23-02-2022
Written in
2021/2022

Question 1. Assuming no one is cheating and the coin is fair, if a customer plays twice, what is the chance they make money? In [ ]: p_winning_after_two_flips = 0.5 * 0.5 In [ ]: _ = ('q1_1') _ = p() A certain customer plays the game 20 times and wins 13 of the bets. You suspect that the customer is cheating! That is, you think that their chance of winning is higher than the normal chance of winning. You decide to test your hunch using the outcomes of the 20 games you observed.

Show more Read less
Institution
Course










Whoops! We can’t load your doc right now. Try again or contact support.

Written for

Course

Document information

Uploaded on
February 23, 2022
Number of pages
19
Written in
2021/2022
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

Content preview

hw06


December 12, 2018


In [ ]: # Homework 6: Testing Hypotheses
Reading: Textbook chapter 11.
Please complete this notebook by filling in the cells provided. Before you begin, execute the
following cell to load the provided tests. Each time you start your server, you will need to execute
this cell again to load the tests.
Homework 6 is due Friday, 11/2 at 11:59pm. Start early so that you can come to office hours if
you’re stuck. Check the website for the office hours schedule. Late work will not be accepted as
per the policies of this course.
Directly sharing answers is not okay, but discussing problems with the course staff or with
other students is encouraged. Refer to the policies page to learn more about how to learn cooper-
atively.
For all problems that you must write our explanations and sentences for, you must pro-
vide your answer in the designated space. Moreover, throughout this homework and all future
ones, please be sure to not re-assign variables throughout the notebook! For example, if you use
max_temperature in your answer to one question, do not reassign it later on.
In [ ]: # Don't change this cell; just run it.
! pip install -U okpy

import numpy as np
from datascience import *

# These lines do some fancy plotting magic.
import matplotlib
%matplotlib inline
import matplotlib.pyplot as plt
plt.style.use('fivethirtyeight')
import warnings
warnings.simplefilter('ignore', FutureWarning)

from client.api.notebook import Notebook
ok = Notebook('hw06.ok')
_ = ok.auth(inline=True)

0.1 1. Catching Cheaters
Suppose you are a casino owner, and your casino runs a very simple game of chance. The dealer
flips a coin. The customer wins 9 dollars from the casino if it comes up heads and loses 10 dollars

1

,if it comes up tails.




2

, Question 1. Assuming no one is cheating and the coin is fair, if a customer plays twice, what
is the chance they make money?

In [ ]: p_winning_after_two_flips = 0.5 * 0.5

In [ ]: _ = ok.grade('q1_1')
_ = ok.backup()

A certain customer plays the game 20 times and wins 13 of the bets. You suspect that the
customer is cheating! That is, you think that their chance of winning is higher than the normal
chance of winning.
You decide to test your hunch using the outcomes of the 20 games you observed.




3

Get to know the seller

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
boomamor2 NURSING
Follow You need to be logged in order to follow users or courses
Sold
1009
Member since
4 year
Number of followers
733
Documents
3792
Last sold
13 hours ago

4.0

114 reviews

5
59
4
23
3
16
2
4
1
12

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Frequently asked questions