For the rest of this question, suppose you decide to use the number of times you see the area code 781 in 50 spam calls as your test statistic. Question 5. Write a function called simulate that generates exactly one simulated value of your test statistic under the null hypothesis. It should take no arguments and simulate 50 area codes under the assumption that the result of each area is sampled from the range 200-999 inclusive with equal probability. Your function should return the number of times you saw the 781 area code in those 50 random spam calls.

Solved
Show answers

Ask an AI advisor a question