Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

A checks if his dog zulu has psychic powers, He writes code to display two windo

ID: 3265901 • Letter: A

Question

A checks if his dog zulu has psychic powers, He writes code to display two windows. He enters either “Left” or “Right” depending on which way zulu is facing. Then the random number generator selects either the left or the right window, with probability 0.5 for each, in which to display a circle. Let p be the probability zulu guesses correctly on a given trial (assume this is constant.) In 80 trials, Zulu correctly guesses the window with the circle 41 times.

1. Using mathematical notation, write down null and alternative hypotheses for a one-sided test.

2. If the test statistic is the number of correct guesses (41) in 80 trials, write down R code to find the P-value of a one-sided test.

3. Even without R, we can see that zulu's success rate is close to its expected value under the null, so the one-tailed P-value will be close to 0.5. State your conclusion about the pup's psychic powers.

4.Continued from part (b). If you only know that the R code dbinom(40, 80, 0.5) gives the number 0.0889, how would you find the exact P-value of the test?

Explanation / Answer

1) Ho : p = 0.5

Ha: p > 0.5

2)

p-value = P(X >= 41) =   1-pbinom(40,80,0.5)

= 0.4555361

3) p-value is close to 0.5

since p-value > 0.05 (level of significance}

we fail to reject the null

and conclude that there is not enough evidence for pup's psychic powers.

4) P(X> = 41)

since p = 1/2 ,the distribution in symmetric

hence

P(X < 40) = P(X> 40)

and P(X <40)+P(X=40) +P(X>40) = 1

hence p-value = (1 - 0.0889)/2 = 0.45555

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote