Presentation is loading. Please wait.

Presentation is loading. Please wait.

Hypothesis Testing – Two Samples

Similar presentations


Presentation on theme: "Hypothesis Testing – Two Samples"— Presentation transcript:

1 Hypothesis Testing – Two Samples
Chapters 12 & 13

2 Chapter Topics Comparing Two Independent Samples
Independent samples Z test for the difference in two means Pooled-variance t test for the difference in two means F Test for the Difference in Two Variances Comparing Two Related Samples Paired-sample Z test for the mean difference Paired-sample t test for the mean difference Two-sample Z test for population proportions Independent and Dependent Samples

3 Comparing Two Independent Samples
Different Data Sources Unrelated Independent Sample selected from one population has no effect or bearing on the sample selected from the other population Use the Difference between 2 Sample Means Use Z Test or t Test for Independent Samples

4 Independent Sample Z Test (Variances Known)
Assumptions Samples are randomly and independently drawn from normal distributions Population variances are known Test Statistic

5 t Test for Independent Samples (Variances Unknown)
Assumptions Both populations are normally distributed Samples are randomly and independently drawn Population variances are unknown but assumed equal If both populations are not normal, need large sample sizes

6 Developing the t Test for Independent Samples
Setting Up the Hypotheses H0: m 1 = m H1: m 1 ¹ m 2 H0: m 1 -m 2 = 0 H1: m m 2 ¹ 0 Two Tail OR H0: m 1 £ m 2 H1: m 1 > m 2 H0: m 1 - m 2 £ 0 H1: m 1 - m 2 > 0 Right Tail OR H0: m 1 ³ m 2 H0: m 1 - m 2 ³ 0 H1: m 1 - m 2 < 0 Left Tail OR H1: m 1 < m 2

7 Developing the t Test for Independent Samples
(continued) Calculate the Pooled Sample Variance as an Estimate of the Common Population Variance

8 Developing the t Test for Independent Samples
(continued) Compute the Sample Statistic Hypothesized difference

9 t Test for Independent Samples: Example
You’re a financial analyst for Charles Schwab. Is there a difference in average dividend yield between stocks listed on the NYSE & NASDAQ? You collect the following data: NYSE NASDAQ Number Sample Mean Sample Std Dev Assuming equal variances, is there a difference in average yield (a = 0.05)? © T/Maker Co.

10 Calculating the Test Statistic

11 Solution .025 .025 t H0: m1 - m2 = 0 i.e. (m1 = m2)
a = 0.05 df = = 44 Critical Value(s): Test Statistic: Decision: Conclusion: Reject H Reject H Reject at a = 0.05. .025 .025 There is evidence of a difference in means. 2.0154 t 2.03

12 (p-Value is between .02 and .05) < (a = 0.05) Reject.
p -Value Solution (p-Value is between .02 and .05) < (a = 0.05) Reject. p-Value 2 is between .01 and .025 Reject Reject a 2 =.025 Z 2.0154 2.03 Test Statistic 2.03 is in the Reject Region

13 Example You’re a financial analyst for Charles Schwab. You collect the following data: NYSE NASDAQ Number Sample Mean Sample Std Dev You want to construct a 95% confidence interval for the difference in population average yields of the stocks listed on NYSE and NASDAQ. © T/Maker Co.

14 Example: Solution

15 Independent Sample (Two Sample) t- Test in JMP
Independent Sample t Test with Variances Known Analyze | Fit Y by X | Measurement in Y box (Continuous) | Grouping Variable in X box (Nominal) |  | Means/Anova/Pooled t

16 Comparing Two Related Samples
Test the Means of Two Related Samples Paired or matched Repeated measures (before and after) Use difference between pairs Eliminates Variation between Subjects

17 Z Test for Mean Difference (Variance Known)
Assumptions Both populations are normally distributed Observations are paired or matched Variance known Test Statistic

18 t Test for Mean Difference (Variance Unknown)
Assumptions Both populations are normally distributed Observations are matched or paired Variance unknown If population not normal, need large samples Test Statistic

19 Dependent-Sample t Test: Example
Assume you work in the finance department. Is the new financial package faster (a=0.05 level)? You collect the following processing times: User Existing System (1) New Software (2) Difference Di C.B Seconds Seconds T.F M.H R.K M.O D.S S.S C.T K.T S.Z

20 Dependent-Sample t Test: Example Solution
Is the new financial package faster (0.05 level)? H0: mD £ 0 H1: mD > 0 Reject a =.05 D = .072 a =.05 Critical Value= df = n - 1 = 9 1.8331 3.66 Decision: Reject H0 t Stat. in the rejection zone. Test Statistic Conclusion: The new software package is faster.

21 Confidence Interval Estimate for of Two Dependent Samples
Assumptions Both populations are normally distributed Observations are matched or paired Variance is unknown Confidence Interval Estimate:

22 Example Assume you work in the finance department. You want to construct a 95% confidence interval for the mean difference in data entry time. You collect the following processing times: User Existing System (1) New Software (2) Difference Di C.B Seconds Seconds T.F M.H R.K M.O D.S S.S C.T K.T S.Z

23 Solution:

24 F Test for Difference in Two Population Variances
Test for the Difference in 2 Independent Populations Parametric Test Procedure Assumptions Both populations are normally distributed Test is not robust to this violation Samples are randomly and independently drawn

25 The F Test Statistic F = Variance of Sample 1 = Variance of Sample 2
n1 - 1 = degrees of freedom = Variance of Sample 2 n2 - 1 = degrees of freedom F

26 Developing the F Test Hypotheses Test Statistic
H0: s12 = s22 H1: s12 ¹ s22 Test Statistic F = S12 /S22 Two Sets of Degrees of Freedom df1 = n1 - 1; df2 = n2 - 1 Critical Values: FL( ) and FU( ) FL = 1/FU* (*degrees of freedom switched) Reject H0 Reject H0 Do Not Reject a/2 a/2 FL FU F n1 -1, n2 -1 n1 -1 , n2 -1

27 Developing the F Test Easier Way Test Statistic
Put the largest in the num. Test Statistic F = S12 /S22 Reject H0 Do Not Reject a F F

28 F Test: An Example Assume you are a financial analyst for Charles Schwab. You want to compare dividend yields between stocks listed on the NYSE & NASDAQ. You collect the following data: NYSE NASDAQ Number Mean Std Dev Is there a difference in the variances between the NYSE & NASDAQ at the a = 0.05 level? © T/Maker Co.

29 F Test: Example Solution
Finding the Critical Values for a = .05

30 F Test: Example Solution
Test Statistic: Decision: Conclusion: H0: s12 = s22 H1: s12 ¹ s22 a = .05 df1 = df2 = 24 Critical Value(s): Reject Do not reject at a = 0.05. .05 There is insufficient evidence to prove a difference in variances. F 2.33 1.25

31 F Test: One-Tail H0: s12 ³ s22 H0: s12 £ s22 or H1: s12 < s22
Degrees of freedom switched Reject Reject a = .05 a = .05 F F

32 F Test: One-Tail Easier Way Test Statistic Put the largest in the num.
F = S12 /S22 Reject H0 Do Not Reject a F F

33 Z Test for Differences in Two Proportions (Independent Samples)
What is It Used For? To determine whether there is a difference between 2 population proportions and whether one is larger than the other Assumptions: Independent samples Population follows binomial distribution Sample size large enough: np  5 and n(1-p)  5 for each population

34 Z Test Statistic

35 The Hypotheses for the Z Test
Research Questions No Difference Prop 1  Prop 2 Prop 1  Prop 2 Hypothesis Any Difference Prop 1 < Prop 2 Prop 1 > Prop 2 p - p = 0 p - p p - p H 1 2 1 2 1 2 p - p < 0 p - p > 0 H p - p  1 1 2 1 2 1 2

36 Z Test for Differences in Two Proportions: Example
As personnel director, you want to test the perception of fairness of two methods of performance evaluation. 63 of 78 employees rated Method 1 as fair. 49 of 82 rated Method 2 as fair. At the 0.01 significance level, is there a difference in perceptions?

37 Calculating the Test Statistic

38 Z Test for Differences in Two Proportions: Solution
H0: p1 - p2 = 0 H1: p1 - p2  0  = 0.01 n1 = 78 n2 = 82 Critical Value(s): Test Statistic: Decision: Conclusion: Z 2 . 90 Reject at  = 0.01. Reject H Reject H .005 .005 There is evidence of a difference in proportions. -2.58 2.58 Z

39 Confidence Interval for Differences in Two Proportions
The Confidence Interval for Differences in Two Proportions

40 Confidence Interval for Differences in Two Proportions: Example
As personnel director, you want to find out the perception of fairness of two methods of performance evaluation. 63 of 78 employees rated Method 1 as fair. 49 of 82 rated Method 2 as fair. Construct a 99% confidence interval for the difference in two proportions.

41 Confidence Interval for Differences in Two Proportions: Solution
We are 99% confident that the difference between two proportions is somewhere between and

42 Z Test for Differences in Two Proportions (Dependent Samples)
What is It Used For? To determine whether there is a difference between 2 population proportions and whether one is larger than the other Assumptions: Dependent samples Population follows binomial distribution Sample size large enough: np  5 and n(1-p)  5 for each population

43 Z Test Statistic for Dependent Samples
Sample Two Category 1 Category 2 Sample One a b a+b c d c+d a+c b+d N This Z can be used when a+d>10 If 10<a+d<20, use the correction in the text

44 Unit Summary Compared Two Independent Samples
Performed Z test for the differences in two means Performed t test for the differences in two means Performed Z test for differences in two proportions Addressed F Test for Difference in Two Variances

45 Unit Summary Compared Two Related Samples
Performed dependent sample Z tests for the mean difference Performed dependent sample t tests for the mean difference Performed Z tests for proportions using dependent samples


Download ppt "Hypothesis Testing – Two Samples"

Similar presentations


Ads by Google