Practice Set 03

Remarks on simulation

Make sure to run the code and determine how good is the agreement between the simulated values and the exact values (if available).

Random cellphones

Suppose that three executives drop their identical looking cell phones in an elevator, can’t tell which is which, and so pick up the phones at random.

  1. List the sample space of all possible outcomes, by labeliing the cell phones A, B, and C, and then let the ordering ABC represent the outcome that everyone gets the correct phone.
  2. Use the sample space to determine the probability that at least one executive gets the correct phone. Write a one-sentence interpretation of this probability.
  3. Let the random variable \(X\) represent the number of executives who get the correct phone. Use the sample space to determine the probability distribution of \(X\). Draw a graph of this probability distribution.
  4. Determine the expected value of this probability distribution. Provide a one-sentence interpretation of this expected value.

Hospital prank

Return to the hospital joke example in our slides here.

  1. Explore what the probability of zero matches will be if there were 6 babies. Write down functioning R code which will allow you to simulate this probability.
  2. Explore what the expected value of matches will be if there were 6 babies. Write down functioning R code which will allow you to simulate this expected value.

Roulette

In the game of roulette, a ball is spun on a wheel that has 38 numbered slots. These slots have colors as well as numbers: 18 are red, 18 black, and 2 green. If you bet 1 dollar on a particular number, then you win 35 dollars if the ball lands on your number; otherwise, you lose 1 dollar. Let the random variable \(X\) denote your net winnings from betting 1 dollar on a particular number.

  1. Determine the probability distribution of \(X\).
  2. Determine the expected value of \(X\).
  3. Is it possible for a bet on one spin of the roulette wheel to result in exactly the value found in Item 2?
  4. Write down functioning R code which will enable you to simulate Items 1 and 2. Show how you can use the code to actually answer Item 3.

Roulette, redux

Return to the previous roulette earlier. If you bet 1 dollar on the color red, you win 1 dollar if the ball lands on red and you lose 1 dollar otherwise. Let the random variable \(Y\) denote your net winnings from betting 1 dollar on red.

  1. Determine the probability distribution of \(X\).
  2. Determine the expected value of \(X\).
  3. Is it possible for a bet on one spin of the roulette wheel to result in exactly the value found in Item 2?
  4. Write down functioning R code which will enable you to simulate Items 1 and 2. Show how you can use the code to actually answer Item 3.
  5. How do the expected values of the two types of bets (betting on number vs betting on the color red) compare? Interpret what this means.
  6. Would your findings in the previous items change if we bet on black instead?

Extrasensory perception

A standard test for extrasensory perception (ESP) asks subjects to identify which of four shapes (circle, square, diamond, waves) is on front of a card, viewed by the experimenter but not the subject. Suppose that a subject takes a test with 25 of these cards. Let the random variable \(C\) be the number of correct identifications.

  1. Does \(C\) follow a binomial distribution? If so, justify each criterion. Also specify the parameters of the distribution, assuming that the subject is just guessing.

  2. What is the probability that a guessing subject would get 10 or more correct?

  3. Find the closest value of \(c\) such that \(\mathbb{P}\left(C\geq c\right)\leq 0.01\) by experimenting with pbinom().

  4. How many identifications would the subject have to get correct in order for the probability that a guesser would get at least that many correct will be less than 0.01? How is this related to Item 3?

ESP research case

Read the following case:

  1. Explain why the probability of a subject’s making a correct identification just by chance was 1/5. Why do you think it is called “making a correct identification just by chance”.

  2. Explain how 12000 was obtained. Of course, do not respond by just writing 60000 multiplied by 1/5 equals 12000. That much is obvious.

  3. Do you think this is a hypothesis testing situation? If yes, what is the “ordinary” claim and what is the “out-of-ordinary” claim?

  1. The \(p\) being referred to in the case refers to what symbol in our course?

  2. What do you think is the purpose of the calculation in (4.3.1)? What value does it serve?

  3. Write down functioning R code which will allow you to compute (4.3.1). Run the code and write down your conclusion.

Below you will find a description of the analysis:

River contamination

Return to the river contamination examples in our slides here.

  1. Define a random variable \(C\) as the count of the number of noncompliant days in ten measurements from the river. Can \(C\) be considered a binomial random variable? Explain.

  2. What do \(n\) and \(\pi\) represent in this context? Be very specific and adapt to the context.

  3. What is the “ordinary” claim in terms of \(\pi\)? What is the “out-of-ordinary” claim in terms of \(\pi\)?

  4. What is the expected number of noncompliant measurements under the “ordinary” claim?

  5. Compute the exact \(p\)-value using the binomial distribution. Would you say that under the “ordinary” claim that it is very unlikely to that a sample of 10 days would have 4 or more noncompliant days? Explain.

  6. Suppose now that there were a total of 34 measurements and that 19 are noncompliant. Does this sample provide strong evidence that something “out-of-ordinary” has happened? Explain by providing a probability calculation to support your conclusion.

  7. Why do you think the measurements are spaced out every 11 days? How is it connected to the requirements of a binomial random variable?

  8. Why do you think the measurements were done over March to June only? How is it connected to the requirements of a binomial random variable?

Organ transplants

Return to the organ transplant example in our slides here.

  1. Answer the final question in the slides in two ways – set things up as a problem involving the binomial distribution and use simulation via R.

  2. Do you think the constant “probability of success” is plausible here? Explain why or why not.

Cola discrimination

A teacher doubted whether his students coudl distinguish between the tastes of different brands of cola, so he presented each of his 21 students with three cups. Two cups contained one brand of cola and the third cup contained a different brand. Which cups contained which brands was randomly determined for each student. Each student was asked to identify which cup contained the cola that was different from the other two. It turned out that 12 of the students successfully identified the “odd” cola.

  1. Does this result provide strong evidence that these students do better than guessing in discriminating among the colas? Address this question with an appropriate test, including a statement of the claims (write the claims in mathematical terms and using pure English), a definition of the underlying random variable, and a \(p\)-value calculation. Summarize your conclusion, and explain the reasoning process by which it follows.

  2. Calculate and interpret a 95% confidence interval based on the data. Clearly define the parameter that this interval estimates, and interpret the interval.

  3. How would your answer to Item 3 change if you were asked to provide a 90% confidence interval?

Surveys

In a survey of 400 likely voters, 215 responded that they would vote for the incumbent and 185 responded that they would vote for the challenger. Let \(\pi\) denote the proportion of all likely voters who preferred the incumbent at the time of the survey.

  1. Why would \(\pi\) be unknown? Why would we need to estimate it?
  2. Use the survey results to provide a point estimate of \(\pi\).
  3. Provide an estimate of the standard error of your point estimate.
  4. Modify the R code in our slides to produce a 99% confidence interval for \(\pi\).
  5. Experiment with the R code by trying different values of \(n\) so that a 99% confidence interval for \(\pi\) will have a length (upper limit minus lower limit) equal to 0.01. In effect, you will be figuring out how many survey respondents should be recruited in order for a confidence interval have a specified length.