Hyp Test II: 1 Hypothesis Testing: Additional Applications In this lesson we consider a series of examples that parallel the situations we discussed for.

Slides:



Advertisements
Similar presentations
Statistics Review – Part II Topics: – Hypothesis Testing – Paired Tests – Tests of variability 1.
Advertisements

Hypothesis Testing Steps in Hypothesis Testing:
Inference for Regression
Confidence Interval and Hypothesis Testing for:
Copyright ©2011 Brooks/Cole, Cengage Learning Testing Hypotheses about Means Chapter 13.
Copyright ©2011 Brooks/Cole, Cengage Learning Testing Hypotheses about Means Chapter 13.
Significance Testing Chapter 13 Victor Katch Kinesiology.
Comparing Two Population Means The Two-Sample T-Test and T-Interval.
Chapter 9: Inferences for Two –Samples
© 2010 Pearson Prentice Hall. All rights reserved Single Factor ANOVA.
Chapter Seventeen HYPOTHESIS TESTING
MARE 250 Dr. Jason Turner Hypothesis Testing II To ASSUME is to make an… Four assumptions for t-test hypothesis testing: 1. Random Samples 2. Independent.
MARE 250 Dr. Jason Turner Hypothesis Testing II. To ASSUME is to make an… Four assumptions for t-test hypothesis testing:
Point and Confidence Interval Estimation of a Population Proportion, p
BCOR 1020 Business Statistics
Topic 2: Statistical Concepts and Market Returns
Analysis of Differential Expression T-test ANOVA Non-parametric methods Correlation Regression.
Hypothesis Testing. Introduction Always about a population parameter Attempt to prove (or disprove) some assumption Setup: alternate hypothesis: What.
Sample Size Determination In the Context of Hypothesis Testing
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall Statistics for Business and Economics 7 th Edition Chapter 9 Hypothesis Testing: Single.
Inferences About Process Quality
Chapter 9 Hypothesis Testing.
Hypothesis Testing – Part I
5-3 Inference on the Means of Two Populations, Variances Unknown
Statistics for Managers Using Microsoft® Excel 5th Edition
Getting Started with Hypothesis Testing The Single Sample.
Week 9 October Four Mini-Lectures QMM 510 Fall 2014.
Statistical Inference for Two Samples
AM Recitation 2/10/11.
Inference for regression - Simple linear regression
Jeopardy Hypothesis Testing T-test Basics T for Indep. Samples Z-scores Probability $100 $200$200 $300 $500 $400 $300 $400 $300 $400 $500 $400.
Fundamentals of Hypothesis Testing: One-Sample Tests
1/2555 สมศักดิ์ ศิวดำรงพงศ์
Statistical Analysis Statistical Analysis
Chapter 9.3 (323) A Test of the Mean of a Normal Distribution: Population Variance Unknown Given a random sample of n observations from a normal population.
Lesson Comparing Two Means.
Copyright © Cengage Learning. All rights reserved. 10 Inferences Involving Two Populations.
More About Significance Tests
Dependent Samples: Hypothesis Test For Hypothesis tests for dependent samples, we 1.list the pairs of data in 2 columns (or rows), 2.take the difference.
McGraw-Hill/Irwin Copyright © 2007 by The McGraw-Hill Companies, Inc. All rights reserved. Statistical Inferences Based on Two Samples Chapter 9.
Comparing Two Population Means
One Sample Inf-1 If sample came from a normal distribution, t has a t-distribution with n-1 degrees of freedom. 1)Symmetric about 0. 2)Looks like a standard.
Week 111 Power of the t-test - Example In a metropolitan area, the concentration of cadmium (Cd) in leaf lettuce was measured in 7 representative gardens.
Copyright © Cengage Learning. All rights reserved. 10 Inferences Involving Two Populations.
Biostatistics Class 6 Hypothesis Testing: One-Sample Inference 2/29/2000.
Copyright © 2013, 2010 and 2007 Pearson Education, Inc. Section Inference about Two Means: Independent Samples 11.3.
Lecture 8 Simple Linear Regression (cont.). Section Objectives: Statistical model for linear regression Data for simple linear regression Estimation.
Confidence intervals and hypothesis testing Petter Mostad
Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 8-1 Chapter 8 Fundamentals of Hypothesis Testing: One-Sample Tests Statistics.
McGraw-Hill/Irwin Copyright © 2007 by The McGraw-Hill Companies, Inc. All rights reserved. Chapter 8 Hypothesis Testing.
Lecture 9 Chap 9-1 Chapter 2b Fundamentals of Hypothesis Testing: One-Sample Tests.
© Copyright McGraw-Hill 2000
Two-Sample Hypothesis Testing. Suppose you want to know if two populations have the same mean or, equivalently, if the difference between the population.
Lesson Comparing Two Means. Knowledge Objectives Describe the three conditions necessary for doing inference involving two population means. Clarify.
1 Objective Compare of two population variances using two samples from each population. Hypothesis Tests and Confidence Intervals of two variances use.
Week111 The t distribution Suppose that a SRS of size n is drawn from a N(μ, σ) population. Then the one sample t statistic has a t distribution with n.
Chap 8-1 Fundamentals of Hypothesis Testing: One-Sample Tests.
Basic Business Statistics, 11e © 2009 Prentice-Hall, Inc. Chap 9-1 Chapter 9 Fundamentals of Hypothesis Testing: One-Sample Tests Basic Business Statistics.
© Copyright McGraw-Hill 2004
ISMT253a Tutorial 1 By Kris PAN Skewness:  a measure of the asymmetry of the probability distribution of a real-valued random variable 
Applied Quantitative Analysis and Practices LECTURE#14 By Dr. Osman Sadiq Paracha.
Lecture 8 Estimation and Hypothesis Testing for Two Population Parameters.
HYPOTHESIS TESTING FOR DIFFERENCES BETWEEN MEANS AND BETWEEN PROPORTIONS.
4-1 Statistical Inference Statistical inference is to make decisions or draw conclusions about a population using the information contained in a sample.
Copyright © 2009 Pearson Education, Inc. Chapter 25 Paired Samples and Blocks.
Two-Sample Hypothesis Testing
Chapter 9: Inferences Involving One Population
Estimation & Hypothesis Testing for Two Population Parameters
Chapter 9 Hypothesis Testing.
Decision Errors and Power
Presentation transcript:

Hyp Test II: 1 Hypothesis Testing: Additional Applications In this lesson we consider a series of examples that parallel the situations we discussed for confidence interval estimation. We will also focus on computer analysis for conducting hypothesis tests

Hyp Test II: 2 Applications we will consider: 1. One population,  2 known – test of the mean, . 2.One Normal population,  2 Unknown, test of mean,  (We have already done several examples of 1&2). 3.3.Paired, Normally distributed data – test of the mean within subject difference,  d. 4.Two Independent Normal populations, test of equality of  1 and  2 : a. UNknown Variances, assumed equal:  1 2   2 2 b. UNknown Variances, assumed UNequal:  1 2   2 2

Hyp Test II: 3 Applications continued: 5.One Normal population – test of the variance,  2. 6.Two Independent Normal distributions, test of equality of variances,  1 2 and  One Binomial Distribution – test of proportion, 

Hyp Test II: 4 Application 3: Paired Normally Distributed Data: Test of  d 1.Research Question Ten patients participated in a study to determine if a diet low in fat is effective in “reducing cholesterol.” Cholesterol levels were measured prior to and following treatment. Is there a mean decrease in cholesterol level after the diet?

Hyp Test II: 5 This is paired data: ID PrePost ……… We are interested in whether the within- subject difference, post-pre, is close to zero, indicating no change, or far from zero, indicating a real change. 2. Assumptions The change in cholesterol levels are a random sample from a normal distribution with unknown variance.

Hyp Test II: 6 3. Specify H o and H a H o :  d = 0 H a :  d  0 While a one-sided test might be of interest, it is possible that cholesterol could increase so we are interested in change in either direction. 4. Test statistic: Variance UNknown suggests we use a t-statistic:

Hyp Test II: 7 5. Decision Rule Compare p-value to type I error set at .05. Reject H o for p< Calculations We have n=10, and after computing a difference for each subject find: x d = -15.1s d =  se = 4.22

Hyp Test II: 8 Achieved Significance (P-value): 7. Statistical Decision Since.006 <.05  p-value < type I error REJECT H o 8. Conclusion This sample suggests that the low fat diet was effective in lowering cholesterol – since a negative change indicates a decreased level post-diet.

Hyp Test II: % Confidence Interval Estimate x  t 9;.975 (se) =  2.26(4.22) = (-24.6, -5.6). This agrees with our conclusion in step 8: The confidence interval does not include zero in fact the upper limit of the interval is less than zero, indicating we are “confident” that there is a true mean decrease

Hyp Test II: 10 Notes: In this example, we wanted to test whether the within-subject mean difference was equal to zero. This type of test is known as a PAIRED t-TEST. Some computer packages offer a special computation of a paired t-test. In other software you must first compute the within-subject differences, and then conduct a one-sample t-test, with  0 = 0 Both strategies are available in Minitab

Hyp Test II: 11 Change in Cholesterol Data in Minitab To compute within subject differences use: Calc  Calculator Name new variable Type in expression to compute using variables and operators:

Hyp Test II: 12 Change in Cholesterol Data in Minitab with computed within-subject difference

Hyp Test II: 13 Using Minitab: 1-Sample t-test on Differences: Stat  Basic Statistics  1-Sample t Select Difference Variable Test Mean is Zero

Hyp Test II: 14 T-Test of the Mean Test of mu = 0.00 vs mu not = 0.00 Variable N Mean StDev SE Mean T P Post_Pre

Hyp Test II: 15 Using Minitab: Paired t-test: Stat  Basic Statistics  Paired t Select the 2 variables Options lets you set mean and confidence level.

Hyp Test II: 16 Paired T-Test and Confidence Interval Paired T for Post - Pre N Mean StDev SE Mean Post Pre Difference % CI for mean difference: (-24.64, -5.56) T-Test of mean difference = 0 (vs not = 0): T-Value = P-Value = 0.006

Hyp Test II: 17 Application 4: Two Independent Normal Populations Test of Equality of Means a. Unknown (EQUAL) variances 1.Research Question In the ICU study, data was collected on 25 consecutive patients, on the type of admission, elective or emergency, and on patient age at admission. Is the mean patient age the same for emergency as for elective admission patients?

Hyp Test II: 18 2.Assumptions Independent samples from normal distributions This is equivalent to taking 2 separate independent samples of consecutive emergency admissions and consecutive elective admissions. Assume  1 2  0 2   2 is unknown. 3.Specify H o and H a H o :  1    0  0 (There is no difference in mean age) H a :  1    0  0 (The mean ages differ)

Hyp Test II: Test statistic: Variance UNknown  t-statistic Variances assumed equal  pooled variance est. 5.Decision Rule Calculate achieved significance (P-value) Reject H o when p-value is less than type I error of.05

Hyp Test II: 20 6.Calculations Statistics on Age: Admit N Mean StDev 0.Elective Emergency Pooled Variance: Test Statistic:

Hyp Test II: 21 Achieved Significance (P-value): 7.Statistical Decision Since p-value >.05 There is insufficient evidence to reject the null hypothesis: do NOT reject 8.Conclusion The data do not indicate a statistically significant difference in the mean age between elective and emergency patients.

Hyp Test II: % Confidence Interval Estimate (x 1 – x 0 )  t 23;.975 (se) =  (8.99) = (-26.24, 10.95). This agrees with our conclusion in step 8: The confidence interval includes zero While the sample means differ by almost 8 years, the variability in age is large, so this difference is not significant. If you feel 8 years is an important difference – failing to find this significant may be an issue of inadequate power

Hyp Test II: 23 In MINITAB: Enter data with 2 variables: Admit: admission status, 1=Emergency, 0=Elective Age: patient age in years

Hyp Test II: 24 Using MINITAB: Stat  Basic Stats  2-Sample t Samples: analysis variable Subscripts: variable defining groups Check to use pooled variance estimate

Hyp Test II: 25 Two-Sample T-Test and CI: Two-sample T for age admit N Mean StDev SE Mean Difference = mu (0) - mu (1) Estimate for difference: % CI for difference: (-10.94, 26.24) T-Test of difference = 0 (vs not =): T-Value = 0.85 P-Value = DF = 23 Both use Pooled StDev = 22.3

Hyp Test II: 26 Application 4: Two Independent Normals Test of Equality of Means b.UNknown (UNEQUAL) Variances 1.Research Question In the ICU study, data collected on these patients included the hospital length of stay (LOS) in days. Is the mean length of stay the same for emergency admission as for elective admission patients?

Hyp Test II: 27 2.Assumptions Independent samples from normal distributions This is equivalent to taking 2 separate independent samples of consecutive emergency admissions and consecutive elective admissions. Assume  1 2  2 2 unknown. 3.Specify H o and H a H o :  1    o  0 (No difference in means) H a :  1    o  0 (Means are different)

Hyp Test II: 28 4.Test statistic: use separate estimates of the variances of each sample Satterthwaite’s degrees of freedom

Hyp Test II: 29 5.Decision Rule Calculate achieved significance (P-value) Reject H o for p less than type I error of.05 6.Calculations straight to the computer analysis – tricky to do by hand – that degrees of freedom computation is a nightmare with a hand calculator!

Hyp Test II: 30 Using Minitab: Stats  Basic Stats  2-sample t Samples: analysis variable Subscripts: variable defining groups Do NOT Check to use separate variance estimates

Hyp Test II: 31 Two Sample T-Test and Confidence Interval Two sample T for LOS Admit N Mean StDev SE Mean % CI for mu (0) - mu (1): ( -3.5, 9.9) T-Test mu (0) = mu (1) (vs not =): T = 1.02 P = 0.32 DF = 17

Hyp Test II: 32 7.Statistical Decision Since p-value >.05 There is insufficient evidence to reject the null hypothesis: do NOT reject 8.Conclusion The data do not provide statistically significant evidence that LOS differs between elective and emergency patients.

Hyp Test II: 33 Note: A difference in hospital length of stay of 3 days is actually quite large. This difference as non-significant means we should probably consider: Are our assumptions met? Is the underlying distribution of LOS for each group really normal? LOS often has a very skewed distribution, with a few large outliers. We might want to consider other statistical methods – non- parametric methods. (beyond the scope of this course).

Hyp Test II: 34 Is our sample size large enough? Do we have adequate power to find what is clearly a clinically meaningful difference statistically significant? Since the variances were rather large, we probably need a much larger sample to address this question. See notes on sample size in context of hypothesis testing for further discussion of this point

Hyp Test II: 35 Application 5: One Normal distribution: Test of  2 Example: In drug manufacturing it is important that the amount of drug in the capsules be a particular value on the average that the variation around that value be very small. The drug company will consider its machine accurate enough if the capsules are filled within ± 1 SD =.5 mg of the desired amount of the drug. A sample of 20 capsules are taken, and contents weighed.

Hyp Test II: 36 1.Research Question: Is the variance of drug in the capsules greater than (.5) 2 = 0.25 mg 2 ? 2.Assumptions: The data are a random sample from a normal distribution. 3.Specify Hypotheses: H o :  2  0.25 H a :  2 > 0.25 (One-sided)

Hyp Test II: 37 4.Test Statistic: For a confidence interval for  2 : We used a chi-squared statistic, so our test statistic will be: Where  o 2 is specified by H o.

Hyp Test II: 38 5.Decision Rule: Calculate the achieved significance (p-value) and compare to  =.05. Reject H o for p<.05 We are interested only in a one-sided test: We want the probability for only one tail of the distribution, for a 1-sided test. In this case the upper tail, to reject H o for large values of observed s 2. Chi-squared Distribution, n-1 df

Hyp Test II: 39 6.Calculations: (Our sample gives: x = 2.00, s =.787, n=20 ) To compute achieved significance (p-value) for 1-sided test: 47.07

Hyp Test II: 40 7.Statistical Decision: Our achieved significance (p-value) is less than.05: we will therefore reject H o. 8.Conclusion: The variance of amount of drug per capsule, estimated at s 2 =.62 mg 2, is significantly greater than 0.25 mg 2. The company should adjust it’s machines.

Hyp Test II: 41 9.Confidence Interval Estimate: In this case, for a 1-sided test, want a 95% Lower confidence bound: I am 95% “confident” that the true variance is greater than 0.39 mg 2. (which is greater than 0.25 !)  2.95 = area =.05

Hyp Test II: 42 Not directly available in Minitab (V12, 13) Use strategy of Obtain descriptive stats  s 2 Compute test statistic, y = (n-1)s 2 /  o 2 Obtain achieved significance: Pr[  n  2 > y] = 1 – Pr[y   n  2 ] Calc  Prob Dist  Chisq Cumulative Dist Function Chi-Square with 19 DF x P( X <= x )

Hyp Test II: 43 Using Minitab to get Confidence Interval: Stat  Basic Stats  Display Descriptive Stats 1. Select variable 2. Select Graph menu 3. Check graphical summary and set confidence level

Hyp Test II: 44 Graphical Summary Results include: Use this to get lower bound for 95% 1-sided confidence interval for variance: (.625) 2 = 0.39  2.05  2.95 area = area past  2.05 =.95

Hyp Test II: 45 Application 6: Two Independent Normal Distributions: Test of Equality of Variances 1.Research Question In the example on LOS of Emergency and Elective case ICU patients, we assumed that the variances in LOS of the two patient groups were different. Now I would like to test that assumption. My research question is, “Does the variability of LOS differ between emergency and elective patients?”

Hyp Test II: Assumptions Independent simple random samples from normal distributions. 3.Specify H o and H a :

Hyp Test II: Test Statistic: For comparing two variances we use the F-statistic: By convention: use larger value of s 2 in numerator when computing F-statistic 5. Decision Rule We’ll use a type I error =.05, and reject H o for p<.05.

Hyp Test II: 48 6.Computations:Descriptive Stats for LOS Admit N Mean StDevVar 0.Elective Emergency Here, use s 0 2 in numerator, as larger of 2 values:

Hyp Test II: 49 Achieved Significance: This is a 2-sided test H o, H a specified only equality of variances, not direction

Hyp Test II: 50 7.Statistical Decision The achieved significance is less than.05. We therefore reject H o in favor of the alternative. 8. Conclusion It appears that the variances of LOS among elective and emergency patients differ significantly. The standard deviation of elective patients is 10.9 days, while it is only 4.2 days for emergency patients.

Hyp Test II: 51 9.Confidence Interval: I am 95% “confident” that the true variance ratio is bounded away from zero. Note: Only need a lower limit. Since we always put the larger variance in the numerator, it will always be > 1. Therefore we only need to know if the lower limit is also >1.

Hyp Test II: 52 Test for equality of 2 variances is known as: Variance Ratio Test or F-test for Equality of Variances or F-test for Homogeneity of Variances In Minitab, this is available under: Stat  Basic Statistics  2 Variances (the above is not available in Version 12) OrStat  ANOVA  Test for Equal Variances OrStat  ANOVA  Homogeneity of Variances (depends upon version – test is the same)

Hyp Test II: 53 Stat  Basic Statistics  2 Variances (not in V.12) Samples: analysis variable Subscripts: group variable

Hyp Test II: 54 Stat  ANOVA  Test for Equal Variances Response: analysis variable Factors: group variable

Hyp Test II: 55 Test for Equal Variances (or Homogeneity of Variances) Response LOS Factors Admit ConfLvl Bonferroni confidence intervals for standard deviations Lower Sigma Upper N Factor Levels (Emergency) (Elective) F-Test (normal distribution) Test Statistic: P-Value : Levene's Test (any continuous distribution) Test Statistic: P-Value : 0.229

Hyp Test II: 56

Hyp Test II: 57 Notes on Minitab Results: 95% Confidence intervals on the standard deviation for each sample are displayed – computations are done on variances, and square roots taken of the limits Note little overlap 2 tests for the equality of the variances: F-test assumes a normal distribution for LOS for each group Levene’s test does not require that we assume underlying normality

Hyp Test II: 58 Application 7: Test of Proportion - One Binomial Distribution 1. Research Question: In the ICU study, data was collected on 200 consecutive patients. 40 of the patients died in the hospital. Is there evidence that the in-hospital mortality rate differs from 25%?

Hyp Test II: 59 1.ASSUMPTIONS A random sample of patients (over time) The outcome of mortality follows a Binomial Distribution: Bin( , n). - 2 outcomes: live, die (success) - Probability of dying – constant - Independence of outcome across patients For large n, the sample proportion, p, follows a Normal distribution:

Hyp Test II: 60 3.Specify H o and H a 4.Test Statistic: 5.Decision Rule: We will reject H o for achieved significance less than  = 0.05.

Hyp Test II: Computations Sample estimate: p = 40/200 =.20 Test Statistic: Achieved Significance: z

Hyp Test II: 62 7.Statistical Decision: Since p=.102 >.05  Fail to reject H o. 8.Conclusion: The observed mortality rate of 20% for ICU patients seen at this hospital is not inconsistent with the hypothesized rate of 25%. The difference is not statistically significant. 9.Confidence Interval Estimate:

Hyp Test II: 63 Using Minitab: Stat  Basic Stats  1 Proportion n p oo Check to use Normal approx.

Hyp Test II: 64 Test and CI for One Proportion (Normal Approximation) Test of p = 0.25 vs p not = 0.25 X N Sample p 95.0% CI Z-Value P-Value ( , ) Test and CI for One Proportion (Exact Binomial) Test of p = 0.25 vs p not = 0.25 Exact X N Sample p 95.0% CI P-Value ( , ) 0.103