Survey
* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project
T-distribution & comparison of means Z as test statistic Use a Z-statistic only if you know the population standard deviation (σ). Z-statistic converts a sample mean into a z-score from the null distribution. X H X H Z test 0 SE 0 n p-value is the probability of getting a Ztest as extreme as yours under the null distribution T-distribution & comparison of means t as a test statistic t-test: uses sample data to evaluate a hypothesis about a population mean when population stdev () is unknown We use the sample stdev (s) to estimate the standard error standard x error z = n X H0 X estimated standard sx error t = s n X H0 sX T-distribution & comparison of means t distribution You can use s to approximate σ, but then the sampling distribution is a t distribution instead of a normal distribution Why are Z-scores normally distributed, but t-scores are not? Random (normal) variable constant ztest X H0 X constant Random (normal) variable constant ttest X H0 sX Random (non-normal) variable T-distribution & comparison of means t distribution Very large sample - estimated standard error almost = the true standard error (t almost exactly the same as Z) t distribution is a family of curves. As n gets bigger, t becomes more normal. For smaller n, the t distribution is platykurtic (narrower peak, fatter tails) Use “degrees of freedom” to decide which t curve to use. Basic t-test, df = n-1 T-distribution & comparison of means t distribution Level of significance for a one-tailed test df .05 1 2 3 4 6.314 2.920 2.353 2.132 .025 .01 .005 12.706 32.821 63.657 4.303 6.965 9.925 3.182 4.541 5.841 2.776 3.747 4.604 tcrit T-distribution & comparison of means Practice with Table B.3 With a sample of size 6, what are the degrees of freedom? For a one-tailed test, what is the critical value of t for an alpha of .05? And for an alpha of .01? Df = 5, tcrit = 2.015; tcrit = 3.365 T-distribution & comparison of means Practice with Table B.3 For a sample of size 25, doing a two-tailed test, what are the degrees of freedom and the critical value of t for an alpha of .05 and for an alpha of .01? Df = 24, tcrit = 2.064; tcrit = 2.797 T-distribution & comparison of means Practice with Table B.3 You have a sample of size 13 and you are doing a one-tailed test. Your tcalc = 2. What do you approximate the p-value to be? p-value between .025 and .05 What if you had the same data, but were doing a two-tailed test? p-value between .05 and .10 T-distribution & comparison of means Two-sample testing All the inferential statistics we have considered involve using one sample as the basis for drawing conclusion about one population. Most research studies aim to compare of two (or more) sets of data in order to make inferences about the differences between two (or more) populations. What do we do when our research question concerns a mean difference between two sets of data? T-distribution & comparison of means Two-sample testing Steps for Calculating a Test Statistic: Ho: 1 - 2 = 0 HA: 1 - 2 0 To test the null hypothesis – compute a t statistic and look up in Table B.3 T-distribution & comparison of means Two-sample testing Steps for Calculating a Test Statistic: General t formula t = sample statistic - hypothesized population parameter estimated standard error T-distribution & comparison of means Two-sample testing Steps for Calculating a Test Statistic: One Sample t ttest X H0 Remember? sX For two-sample test ( X 1 X 2 ) ( 1 2 ) t s X1 X 2 T-distribution & comparison of means Two-sample testing Steps for Calculating a Test Statistic: Standard Error for a Difference in Means s X1 X 2 The one-sample standard error ( sx ) measures how much error expected between X and . The two sample standard error (sx1-x2) measures how much error is expected when you are using a sample mean difference (X1 – X2) to represent a population mean difference. T-distribution & comparison of means Two-sample testing Steps for Calculating a Test Statistic: Standard Error for a Difference in Means s X1 X 2 s12 s22 n1 n2 T-distribution & comparison of means Two-sample testing Steps for Calculating a Test Statistic: Each of the two sample means - there is some error. Calculate the total amount of error involved in using two sample means - find the error from each sample separately and then add the two errors together. T-distribution & comparison of means Two-sample testing Steps for Calculating a Test Statistic: Standard Error for a Difference in Means s X1 X 2 BUT: s12 s22 n1 n2 Only works when n1 = n2 T-distribution & comparison of means Two-sample testing Steps for Calculating a Test Statistic: Change the formula slightly - use the pooled sample variance instead of the individual sample variances. Pooled variance = weighted estimate of the variance derived from the two samples. SS1 SS2 s df1 df 2 2 p T-distribution & comparison of means One-Sample T 1. Calculate sample mean 2. Calculate standard error 3. Calculate T and d.f. 4. Use Table B.3 T-distribution & comparison of means SS1 SS2 s df1 df 2 Two-Sample T 2 p 1. Calculate X1-X2 2. Calculate pooled variance s2p 3. Calculate standard error n1 4. Calculate T and d.f. 5. Use Table B.3 t (X1 X 2 ) (1 2 ) sx1 x2 s2p n2 d.f. = (n1 - 1) + (n2 - 1) T-distribution & comparison of means EXAMPLE A developmental psychologist would like to examine the difference in verbal skills for 8-year-old boys versus 8year-old girls. A sample of 10 boys and 10 girls is obtained, and each child is given a standardized verbal abilities test. The data for this experiment are as follows: Girls Boys n1 = 10 n = 10 X2 2 = 37 = 31 SS1 = 150 SS2 = 210 X1 T-distribution & comparison of means EXAMPLE Girls Boys n1 = 10 n2 = 10 X1 = 37 X 2 = 31 SS1 = 150 SS2 = 210 STEP 1: get mean difference X1 X 2 6 T-distribution & comparison of means EXAMPLE Girls Boys n1 = 10 n2 = 10 X1 = 37 X 2 = 31 SS1 = 150 SS2 = 210 STEP 2: Compute Pooled Variance SS1 SS2 150 210 360 s 20 df1 df 2 (10 1) (10 1) 18 2 p T-distribution & comparison of means EXAMPLE Girls Boys n1 = 10 n2 = 10 X1 = 37 X 2 = 31 SS1 = 150 SS2 = 210 STEP 3: Compute Standard Error 2 SE sp 2 sp 20 20 4 2 n1 n2 10 10 T-distribution & comparison of means EXAMPLE Girls Boys n1 = 10 n2 = 10 X1 = 37 X 2 = 31 SS1 = 150 SS2 = 210 STEP 4: Compute T statistic and df t (X1 X 2 ) (1 2 ) (37 31) 0 3 sx1 x2 2 d.f. = (n1 - 1) + (n2 - 1) = (10-1) + (10-1) = 18 T-distribution & comparison of means EXAMPLE Girls Boys n1 = 10 n2 = 10 X1 = 37 X 2 = 31 SS1 = 150 SS2 = 210 STEP 5: Use table B.3 T = 3 with 18 degrees of freedom For alpha = .01, critical value of t is 2.878 Our T is more extreme, so we reject the null There is a significant difference between boys and girls T-distribution & comparison of means T-Test for Independent Samples SUMMARY OF EQUATIONS Sample Data One-sample t-statistic Two-sample t-statistic X X1 X 2 Hypothesized Population Parameter 1 2 Sample Variance 2 s 2 sp SS df SS1 SS2 df1 df 2 Estimated Standard Error s2 n s2p n1 t-statistic t X sx s2p n2 t (X1 X 2 ) (1 2 ) sx1 x2