Download presentation
Presentation is loading. Please wait.
1
Lecture 4 Ttests STAT 3120 Statistical Methods I
2
STAT3120 - Ttests The term “Ttest” comes from the application of the t- distribution to evaluate a hypothesis. The t-distribution is used when the sample size is too small (less than 30) to use s/SQRT(n) as a substitute for the population std. Refer to pages 228/229 in your book for a detailed explanation of the t-distribution. In practice, even hypothesis tests with sample sizes greater than 30, which utilize the normal distribution, are commonly referred to as “ttests”. Note: a “t-statistic” and a “z-score” are conceptually similar
3
STAT3120 - Ttests The t-table (see Appendix 2) is effectively the inverse of the z-score table – the “inside” of the table includes the t- statistics while the “outside” of the table (the designation of the rows and columns) includes the degrees of freedom and the alpha values. To determine an appropriate t-statistic for a test, you must know the alpha value and the degrees of freedom (n-1). Note that as the number of observation increase, the t- distribution is assumed to approach normality.
4
Ttests take three forms: 1.One Sample Ttest - compares the mean of the sample to a given number. e.g. Is average monthly revenue per customer who switches >$50 ? Formal Hypothesis Statement examples: H 0 : $50 H 1 : > $50 H 0 : = $50 H 1 : $50 STAT3120 - Ttests
5
Example from page 232: After a massive outbreak of salmonella, the CDC determined that the source was from a particular manufacturer of ice cream. The CDC sampled 9 production runs if the manufacturer, with the following results (all in MPN/g):.593.142.329.691.231.793.519.392.418 Use this data to determine if the avg level of salmonella is greater than.3 MPN/g, which is considered to be dangerous.
6
STAT3120 - Ttests First, Identify the Hypothesis Statements, including the Type I and Type II errors…and your assignment of alpha. Then, do the computation by hand…
7
Here is the SAS code that you need to execute a one sample ttest: Proc ttest data= H0= alpha= ; Var ; Run; STAT3120 - Ttests
8
2.Two Sample Ttest - compares the mean of the first sample minus the mean of the second sample to a given number. e.g. Is there a difference in the production output of two facilities? Formal Hypothesis Statement examples: H 0 : a - b =0 H 1 : a - b 0 STAT3120 - Ttests
9
When dealing with two sample or paired ttests, it is important to check the following assumptions: 1.The samples are independent 2.The samples have approximately equal variance 3.The distribution of each sample is approximately normal Note – if the assumptions are violated and/or if the sample sizes are very small, we first try a transformation (e.g., take the log or the square root). If this does not work, then we engage in non-parametric analysis: Wilcoxan Rank Sum or Wilcoxan Signed Rank tests.
10
STAT3120 - Ttests Example: Problem 6.9 from the exercises: Proc TTEST data=; Class ; Var ; run;
11
3.Paired Sample Ttest - compares the mean of the differences in the observations to a given number. e.g. Is there a difference in the production output of a facility after the implementation of new procedures? Formal Hypothesis Statement example: H 0 : diff =0 H 1 : diff 0 STAT3120 - Ttests
12
Example: Problem 6.28 from the exercises: PROC TTEST DATA= H0=0 ALPHA=<>; Var Diff; RUN; STAT3120 - Ttests
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.