Write a computer program to simulate 10,00 Bernoulli trials with probability .3 for success on each trial. Have the program compute the 95 percent confidence interval for the probability of success based on the proportion of successes. Repeat the experiment 100 times and see how many times the true value of .3 is included within the confidence limits.
A balanced coin is flipped 400 times. Determine the number [math]x[/math] such that the probability that the number of heads is between [math]200 - x[/math] and [math]200 + x[/math] is approximately .80.
A noodle machine in Spumoni's spaghetti factory makes about 5 percent defective noodles even when properly adjusted. The noodles are then packed in crates containing 1900 noodles each. A crate is examined and found to contain 115 defective noodles. What is the approximate probability of finding at least this many defective noodles if the machine is properly adjusted?
A restaurant feeds 400 customers per day. On the average 20 percent of the customers order apple pie.
- Give a range (called a 95 percent confidence interval) for the number of pieces of apple pie ordered on a given day such that you can be 95 percent sure that the actual number will fall in this range.
- How many customers must the restaurant have, on the average, to be at least 95 percent sure that the number of customers ordering pie on that day falls in the 19 to 21 percent range?
Recall that if [math]X[/math] is a random variable, the cumulative distribution function of [math]X[/math] is the function [math]F(x)[/math] defined by
- Let [math]S_n[/math] be the number of successes in [math]n[/math] Bernoulli trials with probability [math]p[/math] for success. Write a program to plot the cumulative distribution for [math]S_n[/math].
- Modify your program in (a) to plot the
cumulative distribution [math]F_n^*(x)[/math] of the standardized random variable
[[math]] S_n^* = \frac {S_n - np}{\sqrt{npq}}\ . [[/math]]
- Define the normal distribution [math]N(x)[/math] to be the area under the normal curve up to the value [math]x[/math]. Modify your program in (b) to plot the normal distribution as well, and compare it with the cumulative distribution of [math]S_n^*[/math]. Do this for [math]n = 10, 50[/math], and [math]100[/math].
In Example, we were interested in testing the hypothesis that a new form of aspirin is effective 80 percent of the time rather than the 60 percent of the time as reported for standard aspirin. The new aspirin is given to [math]n[/math] people. If it is effective in [math]m[/math] or more cases, we accept the claim that the new drug is effective 80 percent of the time and if not we reject the claim. Using the Central Limit Theorem, show that you can choose the number of trials [math]n[/math] and the critical value [math]m[/math] so that the probability that we reject the hypothesis when it is true is less than .01 and the probability that we accept it when it is false is also less than .01. Find the smallest value of [math]n[/math] that will suffice for this.
In an opinion poll it is assumed that an unknown proportion [math]p[/math] of the people are in favor of a proposed new law and a proportion [math]1-p[/math] are against it. A sample of [math]n[/math] people is taken to obtain their opinion. The proportion [math]{\bar p}[/math] in favor in the sample is taken as an estimate of [math]p[/math]. Using the Central Limit Theorem, determine how large a sample will ensure that the estimate will, with probability .95, be correct to within .01.
A description of a poll in a certain newspaper says that one can be 95% confident that error due to sampling will be no more than plus or minus 3 percentage points. A poll in the New York Times taken in Iowa says that “according to statistical theory, in 19 out of 20 cases the results based on such samples will differ by no more than 3 percentage points in either direction from what would have been obtained by interviewing all adult Iowans.” These are both attempts to explain the concept of confidence intervals. Do both statements say the same thing? If not, which do you think is the more accurate description?