Download Hypothesis testing

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

History of statistics wikipedia , lookup

Statistics wikipedia , lookup

Transcript
University of California, Los Angeles
Department of Statistics
Statistics M11
Introduction to Statistical Methods for Business and Economics
Instructor: Nicolas Christou
Winter 2001
Hypothesis testing
For this lab you must know how to use Stata to take random samples and to compute the
sample mean of each sample. You have used this already…
The program dice2 was used so far to roll one or two dice. Read carefully how it works
because you will be asked to do something else today…
. dice2
Here is how to use dice2
dice2 rolls [numdice numside, save]
rolls = number of rolls of the dice
numdice= the number of dice rolled, default=2
numside= the number of sides on the dice, default=6
The save option saves the resulting data, and
clears out the data currently in memory.
You are probably tired of rolling one or two dice so how can you use dice2 to flip a coin?
If you find a way ask the computer to flip a coin 10 times and see what you get.
Now that you know how to flip a coin use the program dice2 to test the hypothesis that the
computer is flipping a fair coin. A fair coin has a long run probability of heads or tails equal
to 1/2. Suppose that when “heads” occur a random variable X takes the value 1 and when
“tails” occur X takes the value 2. Write down the probability distribution of X.
-
Compute the theoretical mean m and standard deviation s of the above distribution.
Using the mean of the distribution you found in the previous question, clearly set up
the two hypotheses (null and alternative).
Generate 100 samples of size n=100 each from this distribution.
Compute the sample mean of each sample.
If you want to test the hypothesis that the coin is fair, how many times do you expect to
falsely reject the null hypothesis if you are using level of significance a=0.05?
Use the 100 sample means to test 100 times the hypothesis that the coin is fair using
level of significance a=0.05. How many times do you actually reject the null
hypothesis? You must count how many of your 100 tests reject the null hypothesis.
Bring your results on Monday to class together with homework #7.
Nine labs down, one more to go!
You are almost there…