Presentation is loading. Please wait.

Presentation is loading. Please wait.

Ka-fu Wong © 2007 ECON1003: Analysis of Economic Data Lesson8_card-1 Lesson 8, Additional Materials: Card demonstration of hypothesis tests.

Similar presentations


Presentation on theme: "Ka-fu Wong © 2007 ECON1003: Analysis of Economic Data Lesson8_card-1 Lesson 8, Additional Materials: Card demonstration of hypothesis tests."— Presentation transcript:

1 Ka-fu Wong © 2007 ECON1003: Analysis of Economic Data Lesson8_card-1 Lesson 8, Additional Materials: Card demonstration of hypothesis tests

2 Ka-fu Wong © 2007 ECON1003: Analysis of Economic Data Lesson8_card -2 Card experiment We are going to perform an experiment on a deck of 52 cards. Count the actual number of red cards out of 10 trials (with replacement). What is the probability of getting a red card on any trial? Hypothesis: p=0.5 Expected value = 0.5 Standard deviation = (0.5*0.5) 1/2 = 0.5

3 Ka-fu Wong © 2007 ECON1003: Analysis of Economic Data Lesson8_card -3 Card experiment results (10 trials) TrialCard color (B/R)Proportion (#Red/#trial) 1B0 2B0 3B0 4B0 5B0 6B0 7B0 8B0 9B0 10B0

4 Ka-fu Wong © 2007 ECON1003: Analysis of Economic Data Lesson8_card -4 Hypothesis Hypothesis: p = 0.5 Alternative Hypothesis: p < 0.5 Experiment results: # of red cards in 10 trials = x P(X=x) =C(10,x) p x (1-p) n-x = C(10,x) (0.5) x (0.5) 10-x Xp(X) 00.00098 10.00977 20.04395 30.11719 40.20508 50.24609 60.20508 70.11719 80.04395 90.00977 100.00098 Is it possible for the deck of cards to be a standard deck of cards (i.e., p=0.5)? Not very probable. Reject the original hypothesis

5 Ka-fu Wong © 2007 ECON1003: Analysis of Economic Data Lesson8_card -5 Hypothesis Hypothesis: p=0.5 Alternative Hypothesis: p< 0.5 How many draws did it take before the class started feeling uncomfortable with the outcome? The probability that we do not get any red in a sequence of x trials is P(black) x = 0.5 x X p(X) 10.5000 20.2500 30.1250 40.0625 50.0313 60.0156 70.0078 80.0039 90.0020 100.0010 Most of us were ready to reject the deck as fair after 4 to 5 draws. (some would say 4, the others would say 5) We had a good feel of how improbable the hypothesis was.

6 Ka-fu Wong © 2007 ECON1003: Analysis of Economic Data Lesson8_card -6 What is a Hypothesis? A Hypothesis is a statement about the value of a population parameter developed for the purpose of testing. Null Hypothesis H 0 : A statement about the value of a population parameter. The probability of getting red card on any trial is 0.5. The proportion of red cards in the deck is 0.5. Alternative Hypothesis H 1 : A statement that is accepted if the sample data provide evidence that the null hypothesis is false. The probability of getting red card on any trial is less than 0.5. The probability of getting red card on any trial is not 0.5.

7 Ka-fu Wong © 2007 ECON1003: Analysis of Economic Data Lesson8_card -7 Formulating hypotheses Shanghai, whose name means literally “above the sea”, may be submerged in water by 2050. Paul Brown, an environmental correspondent for the Guardian, claimed in Guangzhou in March that global warming will cause sea levels to rise, possibly submerging Shanghai and other coastal cities. Chen Manchun, a Chinese oceanographer, admitted that sea levels near Shanghai will have risen by as much as 60 centimetres by 2050. See, for example, “Experts dismiss claim Shanghai will drown,” By Yin Ping (China Daily), 2007-03-21, http://www.chinadaily.com.cn/china/2007-03/21/content_832777.htm Accessed 2007-04-10.

8 Ka-fu Wong © 2007 ECON1003: Analysis of Economic Data Lesson8_card -8 Formulating hypotheses Null hypothesis #1: The sea levels near Shanghai will remain unchanged in 2050. Alternative hypothesis #1: The sea levels near Shanghai will be higher in 2050. Null hypothesis #2: The sea levels near Shanghai will remain unchanged or lower in 2050. Alternative hypothesis #2: The sea levels near Shanghai will be higher in 2050.

9 Ka-fu Wong © 2007 ECON1003: Analysis of Economic Data Lesson8_card -9 What is the level of significance? Sometimes we may want to set the limits of what we will accept ahead of time. Let  denote such limit. Level of Significance (  ): The probability of rejecting the null hypothesis when it is actually true. If, under the null hypothesis, the probability of observing the sample is less than , the null is rejected. A pre-set  corresponds to a “critical value”.

10 Ka-fu Wong © 2007 ECON1003: Analysis of Economic Data Lesson8_card -10 What is a critical value?  corresponds to a “critical value”. Critical value: The dividing point between the region where the null hypothesis is rejected and the region where it is not rejected. How many draws of “blacks” did it take before the class started feeling uncomfortable with the outcome? Most of us were ready to reject the deck as fair after 4 to 5 draws. If we were ready to reject the deck as fair after 4 draws, the critical value is 4. The level of significance is about 0.0313. X p(X) 10.5000 20.2500 30.1250 40.0625 50.0313 60.0156 70.0078 80.0039 90.0020 100.0010

11 Ka-fu Wong © 2007 ECON1003: Analysis of Economic Data Lesson8_card -11 What is p-value of observing 0 reds in 10 draws? Hypothesis: p=0.5 Alternative Hypothesis: p< 0.5 Experiment results: (Number of red cards in 10 trials) / 10 = x P(X=x) =C(n,x) p x (1-p) n-x = C(10,x) (0.5) x (0.5) 10-x Xp(X) 00.00098 10.00977 20.04395 30.11719 40.20508 50.24609 60.20508 70.11719 80.04395 90.00977 100.00098 P-value is the probability of getting what we get. P-value = 0.00098 in our experiment.

12 Ka-fu Wong © 2007 ECON1003: Analysis of Economic Data Lesson8_card -12 p-Value in Hypothesis Testing A p-Value is the probability, assuming that the null hypothesis is true, of finding a value of the test statistic at least as extreme as the computed value for the test. If the p-Value is smaller than the significance level, H 0 is rejected. If the p-Value is larger than the significance level, H 0 is not rejected.

13 Ka-fu Wong © 2007 ECON1003: Analysis of Economic Data Lesson8_card -13 Reject or not reject Given a null hypothesis and alternative hypothesis, and the sample statistics, if the sample statistics is extreme (i.e., the chance of seeing this extreme or more extreme statistics is small), then we will reject the null and favor the alternative. If the sample statistics is not extreme, then we will not reject the null. Note that we do not say accept the null, because the evidence can be consistent with a range of null hypotheses. For example, the observation of 5 blacks and 5 reds from 10 draws will be consistent with the null of p=0.

14 Ka-fu Wong © 2007 ECON1003: Analysis of Economic Data Lesson8_card -14 Reject or not reject Note that we do not say accept the null, because the evidence can be consistent with a range of null hypotheses. For example, the observation of 5 blacks and 5 reds from 10 draws will be consistent with the null of p in the range of 0.3 to 0.7 P under null P(X  5)P(X  5) 010 0.10.9998530.000147 0.20.9936310.006369 0.30.9526510.047349 0.40.8337610.166239 0.50.6230470.376953 0.60.3668970.633103 0.70.1502680.849732 0.80.0327930.967207 0.90.0016350.998365 101

15 Ka-fu Wong © 2007 ECON1003: Analysis of Economic Data Lesson8_card-15 - END - Additional materials Card demonstration of hypothesis tests


Download ppt "Ka-fu Wong © 2007 ECON1003: Analysis of Economic Data Lesson8_card-1 Lesson 8, Additional Materials: Card demonstration of hypothesis tests."

Similar presentations


Ads by Google