Presentation is loading. Please wait.

Presentation is loading. Please wait.

Hypothesis Testing Judicial Analogy Hypothesis Testing Hypothesis testing  Null hypothesis Purpose  Test the viability Null hypothesis  Population.

Similar presentations


Presentation on theme: "Hypothesis Testing Judicial Analogy Hypothesis Testing Hypothesis testing  Null hypothesis Purpose  Test the viability Null hypothesis  Population."— Presentation transcript:

1

2 Hypothesis Testing

3 Judicial Analogy

4 Hypothesis Testing Hypothesis testing  Null hypothesis Purpose  Test the viability Null hypothesis  Population parameter  Reverse of what the experimenter believes

5 Hypothesis Testing 1. State the null hypothesis, H 0 2. State the alternative hypothesis, H A 3. Choose , our significance level 4. Select a statistical test, and find the observed test statistic 5. Find the critical value of the test statistic ( and p value) 6. Compare the observed test statistic with the critical value, (or compare the p value with  ), and decide to accept or reject H 0

6 Coin Example

7 Coin Analogy

8 Types of Errors You used a decision rule to make a decision, but was the decision correct?

9

10 Modified Coin Experiment Which coins are fair?

11 Cases in Hypothesis Testing Means - variance known - variance unknown Comparison of means - unpaired, variance known - comparison of variances - unpaired, variances unknown but equal - unpaired, variances unknown and unequal - paired Proportion Comparison of Proportion

12 One sample t-test

13 Statistical Hypothesis Test

14 Two-Sided Test of Hypothesis The test of hypothesis is two-sided if the null is rejected when the actual value of interest is either less than or greater than the hypothesized value. H 0 :   15.00 H A :   15.00

15 Two-Sided Test of Hypothesis

16 One-Sided Test of Hypothesis In many situations, you are only interested in one direction. Perhaps you only want evidence that the mean is significantly lower than fifteen. For example, instead of testing H 0 :  = 15 versus H 1 :   15 you test H 0 :   15 versus H 1 :  < 15

17 One-Sided Test of Hypothesis

18 The Critical Values of Z to memorize Two tailed hypothesis –Reject the null (H 0 ) if z  z  /2, or z  - z  /2 One tailed hypothesis –If H A is  > X bar, then reject H 0 if z  z  –If H A is  < X bar, then reject H 0 if z  - z 

19 The Z-test – an example Suppose that you took a sample of 25 people off the street in Morgantown and found that their personal income is $24,379 And you have information that the national average for personal income per capita is $31,632 in 2003. Is the Morgantown significantly different from the National Average Sources: –(1) EconomagicEconomagic –(2) US Bureau of Economic AnalysisUS Bureau of Economic Analysis

20 What to conclude? Should you conclude that West Virginia is lower than the national average? –Is it significantly lower? –Could it simple be a randomly “bad” sample” Assume that it is not a poor sampling technique How do you decide?

21 Example (cont.) We will hypothesize that WV income is lower than the national average. –H 0 : WVInc = USInc (Null Hypothesis) –H A : WVInc < USInc (Alternate Hypothesis) Statistician can write by : –H0:   $31,632 –HA:  < $31,632 Since we know the national average ($31,632) and standard deviation (15000), we can use the z-test to make decide if WV is indeed significantly lower than the nation

22 Example (cont.) Using the z-test, we get For  = 5%  -z  = -z 0.05 = -1.645 THE DECISION IS REJECT H0  SO West Virginia is lower than the national average

23 The t test When we cannot use the population standard deviation, we must employ a different statistical test Think of it this way: –The sample standard deviation is biased a little low, but we know that as the sample size gets larger, it becomes closer to the true value. –As a result, we need a sampling distribution that makes small sample estimates conservative, but gets closer to the normal distribution as the sample size gets larger, and the sample standard deviation more closely resembles the population standard deviation.

24 The t-test (cont.) The t-test is a very similar formula. Note the two differences –using s instead of  –The resultant is a value that has a t- distribution instead of a standard normal one.

25 The Critical Values of t Two tailed hypothesis –Reject the null (H 0 ) if t  t  /2(n-1), or t  - t  /2(n-1)  Reject H 0 if |t| ≥ t  /2(n-1) One tailed hypothesis –If H A is  > X bar, then reject H 0 if t  t  (n-1) –If H A is  < X bar, then reject H 0 if t  - t  (n-1)  Reject H 0 if |t| ≥ t  (n-1)

26 T-test example Suppose we decided to look at Oregon, but do not know the population standard deviation –And we have a small sample anyway (N=25). without an a priori reason to hypothesize higher or lower, use the 2-tailed test Assume Oregon has a mean of 29,340, and that we collected a sample of 169. Using the t-test, we get Critical value = t.025(168) = 1.96  Since |-1.9684| > 1.96 REJECT H0

27 Two sample t-test Two-Sample t-Tests

28 Cereal Example

29 Other Examples Is the income of blacks lower than whites? Are teachers salaries in West Virginia and Mississippi alike? Is there any difference between the background well and the monitoring well of a landfill?

30 The Difference of means Test Frequently we wish to ask questions that compare two groups. –Is the mean of A larger (smaller) than B? –Are As different (or treated differently) than Bs? –Are A and B from the same population? To answer these common types of questions we use the standard two-sample t-test

31 Assumptions independent observations normally distributed data for each group equal variances for each group.

32 The Difference of means Test The standard two-sample t-test is:

33 The equal Variance test If the variances from the two samples are the same we may use a more powerful variation Where

34 If the variances from the two samples are the same we may use a more powerful variation With degree of freedom: The unequal Variance test

35 Which test to Use? In order to choose the appropriate two- sample t-test, we must decide if we think the variances are the same. Hence we perform a preliminary statistical test – the equal variance F-test.

36 The Equal Variance F-test One of the fortunate properties on statistics is that the ratio of two variances will have an F distribution. Thus with this knowledge, we can perform a simple test.

37 F Test for Equality of Variances

38 Interpretation of F-test If we find that F > F  (n1-1,n2-1), (P(F) >.05), we conclude that the variances are unequal. If we find that F ≤ F  (n1-1,n2-1), (P(F) ≤.05), we conclude that the variances are unequal. We then select the equal– or unequal- variance t-test accordingly.

39 Test Statistics and p-Values F Test for equal variances:H 0 :  1 2 =  2 2 Variance Test: F’ = 1.51DF = (3,3) t-Tests for equal means:H 0 :  1 =  2 Unequal Variance t-test: T = 7.4017 DF = 5.8 Equal Variance t-test: T = 7.4017 DF = 6.0 What would we conclude?

40

41

42 PAIRED T-test

43 Paired Samples

44

45

46

47 Proportion

48 Large Sample H0 : p = p 0 H A : p ≠ p 0 or H A : p p 0 Test statistic :

49 Example Do you think it shoul or should not be government implementation the law of pornography and pornoaction? Let p denote the population proportion of Indonesia adults who believe it should be p <.5  minority p >.5  majority

50 Continued example This data is not real, just for ilustration Suppose from 1534 adults, 812 believe it should be H0 : p =.5 H A : p ≠.5 The critical value for  = 5%  z.025 = 1.96 The conclusion -  Reject H0  majority adults agree if government implementation the law of pornography and pornoaction

51 Comparison two proportion

52 Large sample H0 : p 1 = p 2 H A : p 1 ≠ p 2 Test statistic : = x 1 /n 1, = x 2 /n 2, = (x 1 + x 2 )/(n 1 + n 2 )

53 Reference Agresti, A. & Finlay, B. 1997. Statistical Methods for the Social Sciences 3 rd Edition. Prentice Hall. Mac Gregor. 2006. Lecture 3: Review of Basic Statistics. McMaster University PS 601 Notes – Part II Statistical Tests SAS Inc Tang, A. 2004. Lecture 9 Common Statistical Test. Tufts University


Download ppt "Hypothesis Testing Judicial Analogy Hypothesis Testing Hypothesis testing  Null hypothesis Purpose  Test the viability Null hypothesis  Population."

Similar presentations


Ads by Google