**TQSA3**

**Question 1: ****Bayes Theorem**

From 2011 to 2015, more than a thousand Russian athletes in various sports, including summer, winter, and Paralympic sports, benefited from a state-run doping program. A new drug test being considered by the International Olympic Committee can detect the presence of a banned substance when it has been taken by the subject 94% of the time. However, the test also registers a “false positive“ in 3% of the population that has never taken the banned substance.

**a.** If 3% of the athletes in question are taking the banned substance (97% are not taking it), what is the probability that a random person that has a positive drug test is actually taking the banned substance?

**Question 2: Distribution 1**

When circuit boards used in the manufacture of compact disc players are tested, the long-run percentage of defectives is 7%. Let X = the number of defective boards in a random sample of size n = 27

a. Determine P(X =2)

b. Determine P(1 = X = 3)

c. What is the probability that none of the boards is defective?

**HINT:** Use Python’s scipy.stats library to calculate the values.

**Question 3: Distribution 2**

Consider a daily lottery, where a random number from 1 to 147 is selected as a winning number every day. Each lottery ticket is numbered from 1 to 147. You’ve decided to buy one ticket a day until you win.

a. What are the chances that you will win in the first 15 days?

b. What are the chances that you will not win after 365 days?

c. What is the average number of tickets you’ll end up buying?

**HINT**: Use Python’s scipy.stats library to calculate the values.

**Question 4: Distribution 3**

As a part of your job application you have to review 7 financial reports randomly selected from a collection of 165 reports. You’ve been told that out of 165 reports 13 are fraudulent.

a. What is the probability that there are no fraudulent reports in your job interview assignment?

b. What is the probability that there are at least 2 fraudulent reports in your assignment?

c. What is the expected number of fraudulent reports in your assignment?

**Question 5: Binomial Test**

You regularly play in a local poker game of Texas Holdem, but you feel something is off with that game. In particular, you feel that you never see enough aces before the flop. Every round, the players get 2 cards each before the flop (so you may end up with two aces if lucky). You decided to count the total number of times you got two aces in the last 1341 rounds. After counting all your double aces, you realized that you had 5 total double ace hands in 1341 rounds. Use binomial test to check whether the game was fair to you.

a. How much aces would you expect?

b. What is your p-value for the one-sided test? (probability of getting even more extreme deviation from the expected value)