370 likes | 606 Views
T-DISTRIBUTION & COMPARISON OF MEANS. Z as a Test Statistic. Use a Z-statistic only if you know the population standard deviation (σ). . x =. s. s x =. n. n. T as a Test Statistic.
E N D
Z as a Test Statistic • Use a Z-statistic only if you know the population standard deviation (σ)
x= s sx= n n T as a Test Statistic • T-test: uses sample data to evaluate a hypothesis about a population mean when population std. dev. (σ) is unknown • Use the sample std. dev. (s) to estimate the standard error estimated standard error standard error
T-Distribution • Level of significance for a one-tailed test tcrit
Practice with Table B.3 • With a sample of size 6, what are the degrees of freedom? • df = 5 • For a one-tailed test, what is the critical value of t for an alpha of 0.05? • tcrit = 2.015 • And for an alpha of 0.01? • tcrit = 3.365
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 0.05 and for an alpha of 0.01? • df = 24, tcrit = 2.064; tcrit = 2.797
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 0.025 and 0.05 • What if you had the same data, but were doing a two-tailed test? • p-value between 0.05 and 0.10
One-Sample T • Calculate sample mean • Calculate standard error • Calculate t and d.f. • Look up critical value in Table B.3 and either reject or retain null hypothesis
Example • Researchers want to test whether the pulse rate of long-distance runners differs from that of other athletes • They randomly sample 8 long-distance runners, measure their resting pulse, and obtain the following data: 45, 42, 64, 54, 58, 49, 48, 56 • The average resting pulse of athletes in the general population is 60 beats per minute • Test the null hypothesis at the 0.05 level of significance
Example HO: Pulse of long-distance runners = 60 HA: Pulse of long-distance runners differs from 60 • Mean = 416/8 = 52 • SS = 374; s2 = 53.4; s = 7.3; SE = 2.6 • df = 7 • t = (52-60)/2.6 = 3 • tcrit (from table) at alpha of 0.05 = 2.365 • Reject null hypothesis. There is a significant difference
Two-Sample Testing • So far we have only considered using one sample as the basis for drawing conclusions about one population • Most research studies aim to compare 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?
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
Two-Sample Testing Steps for Calculating a Test Statistic: General tformula: t = sample statistic - hypothesized population parameter estimated standard error
One Sample t For two-sample test Two-Sample Testing Steps for Calculating a Test Statistic:
Two-Sample Testing Steps for Calculating a Test Statistic: • Standard Error for a Difference in Means
Two-Sample Testing Steps for Calculating a Test Statistic: • Error associated with each of the two sample means • To 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
Two-Sample Testing Steps for Calculating a Test Statistic: • Standard Error for a Difference in Means BUT: Only works when n1 = n2
Two-Sample Testing Steps for Calculating a Test Statistic: • Change formula slightly - use the pooled sample variance instead of individual sample variances • Pooled variance = weighted estimate of the variance derived from the two samples
Two-Sample T • Calculate X1-X2 • Calculate pooled variance • Calculate standard error • Calculate t and d.f. • Get critical value from Table B.3 and either reject or retain null hypothesis SE = d.f. = (n1 - 1) + (n2 - 1)
Example A developmental psychologist would like to examine the difference in verbal skills for 8-year-old boys versus 8-year-old girls. A sample of 10 boys and 10 girls is obtained and each child is given a standardised verbal abilities test. The data for this experiment are as follows: Girls Boys n1 = 10 n2 = 10 X1 = 37 X2 = 31 SS1 = 150 SS2 = 210
Example Girls Boys n1 = 10 n2 = 10 X1 = 37 X2 = 31 SS1 = 150 SS2 = 210
Example Girls Boys n1 = 10 n2 = 10 X1 = 37 X2 = 31 SS1 = 150 SS2 = 210
Example Girls Boys n1 = 10 n2 = 10 X1 = 37 X2 = 31 SS1 = 150 SS2 = 210
Example Girls Boys n1 = 10 n2 = 10 X1 = 37 X2 = 31 SS1 = 150 SS2 = 210
Example Girls Boys n1 = 10 n2 = 10 X1 = 37 X2 = 31 SS1 = 150 SS2 = 210
Paired T-Test • Used when two samples are not independent of each other • Observations in one sample can be paired with observations in the other sample • For example: • Before and after observations on the same subjects • A comparison of two different measurements or treatments on the same subjects
Paired T-Test: Procedure • Calculate the difference (di = yi − xi) between the two observations on each pair, making sure you distinguish between positive and negative differences • Calculate the mean difference • Calculate the standard deviation of the differences (sd) and use this to calculate the standard error of the mean difference • SE = sd / n • Calculate t = d / SE • Degrees of freedom = n − 1 • Use Table B.3 to obtain tcrit
Example • Four individuals with high levels of cholesterol went on a special diet, avoiding high cholesterol foods and taking special supplements. • Their total cholesterol levels before and after the diet were as follows: BeforeAfter 287 255 305 269 245 243 309 247 Using the 0.05 level of significance, was there a significant decrease in cholesterol after the diet?
Example BeforeAfterDifferenced-d(d-d)2 287 255 32 -1 1 305 269 36 3 9 245 243 2 -31 961 309 247 62 29 841 132 (Total) 1812 (SS) Mean difference = 132/4 = 33 Standard deviation = 1812/3 = 24.6 Standard error = 12.3 t = 33/12.3 = 2.683 df = 3 tcrit = 2.353 (one-sided test at α = 0.05) Reject null hypothesis
Confidence Intervals • Error is involved in all experiments • CIs give an estimate of the amount of error • Tell us about the precision of the statistical estimates • CIs related to power of study to detect differences • Larger CIs = less power • Smaller CIs = more power
Confidence Intervals • Gives a RANGE of values likely to include an unknown population parameter • Calculated from a set of sample data
Confidence Intervals • Confidence level = 1 - • If alpha is 0.05, then the confidence level is 95% • 95% confidence means that 95% of the time, this procedure will capture the true mean (or the true effect) somewhere within the range
Confidence Intervals • Width of interval indicates how uncertain we are about the unknown parameter (95%, 99%, etc.) • Sample size: larger n = narrower interval • Confidence Limits: upper and lower boundaries of CI
C. I. = C. I. = X1 – X2 tcrit (SX1 – X2) Confidence Interval for a Mean • Formula for the 95% CI for a mean: • and for between two means:
C. I. = 15.5 (2.26)(4.2/ 10) 15.5 3 years CI = (12.50, 18.50) yes no Example • We have a sample of 10 girls who, on average, went on their 1st camping trip at 15.5 yrs, with a standard deviation of 4.2 years • What range of values can we assert with 95% confidence contains the true population mean? • Using an alpha = 0.05, would we reject the null hypothesis that µ = 10? • What about that µ = 17?
C. I. = X1 – X2 tcrit (SX1 – X2) Example • Recall example of verbal skills in 8-year boys and girls • tcrit = 2.101 for α = 0.05 and 18 d.f. 95% CI = 37-31 ± 2.101(2) = 6 ± 4.202 = (1.798; 10.202) • This interval does not include zero, therefore there is a difference between boys and girls