ttest Testing Inferences about Population Means Learning Objectives
t-test Testing Inferences about Population Means
Learning Objectives n Compute by hand interpret Single sample t n Independent samples t n Dependent samples t n n Use SPSS to compute the same tests and interpret the output
Review 6 Steps for Significance Testing 1. 2. 3. Set alpha (p level). State hypotheses, Null and Alternative. Calculate the test statistic (sample value). 4. 5. 6. Find the critical value of the statistic. State the decision rule. State the conclusion.
One Sample Exercise (1) Testing whether light bulbs have a life of 1000 hours 1. 2. Set alpha. =. 05 State hypotheses. n n 3. Null hypothesis is H 0: = 1000. Alternative hypothesis is H 1: 1000. Calculate the test statistic
Calculating the Single Sample t 800 750 940 970 790 980 820 760 1000 860 What is the mean of our sample? = 867 What is the standard deviation for our sample of light bulbs? SD= 96. 73
Determining Significance 4. 5. Determine the critical value. Look up in the table (Heiman, p. 708). Looking for alpha =. 05, two tails with df = 10 -1 = 9. Table says 2. 262. State decision rule. If absolute value of sample is greater than critical value, reject null. If |-4. 35| > |2. 262|, reject H 0.
α(1 tail) 0. 05 0. 025 α(2 tail) 0. 10 0. 050 df df df 1 6. 3138 12. 707 21 1. 7207 2. 0796 41 1. 6829 2. 0196 61 1. 6702 1. 9996 81 1. 6639 1. 9897 2 2. 9200 4. 3026 22 1. 7172 2. 0739 42 1. 6820 2. 0181 62 1. 6698 1. 9990 82 1. 6636 1. 9893 3 2. 3534 3. 1824 23 1. 7139 2. 0686 43 1. 6811 2. 0167 63 1. 6694 1. 9983 83 1. 6634 1. 9889 4 2. 1319 2. 7764 24 1. 7109 2. 0639 44 1. 6802 2. 0154 64 1. 6690 1. 9977 84 1. 6632 1. 9886 5 2. 0150 2. 5706 25 1. 7081 2. 0596 45 1. 6794 2. 0141 65 1. 6686 1. 9971 85 1. 6630 1. 9883 6 1. 9432 2. 4469 26 1. 7056 2. 0555 46 1. 6787 2. 0129 66 1. 6683 1. 9966 86 1. 6628 1. 9879 7 1. 8946 2. 3646 27 1. 7033 2. 0518 47 1. 6779 2. 0117 67 1. 6679 1. 9960 87 1. 6626 1. 9876 8 1. 8595 2. 3060 28 1. 7011 2. 0484 48 1. 6772 2. 0106 68 1. 6676 1. 9955 88 1. 6623 1. 9873 9 1. 8331 2. 2621 29 1. 6991 2. 0452 49 1. 6766 2. 0096 69 1. 6673 1. 9950 89 1. 6622 1. 9870 10 1. 8124 2. 2282 30 1. 6973 2. 0423 50 1. 6759 2. 0086 70 1. 6669 1. 9944 90 1. 6620 1. 9867 11 1. 7959 2. 2010 31 1. 6955 2. 0395 51 1. 6753 2. 0076 71 1. 6666 1. 9939 91 1. 6618 1. 9864 12 1. 7823 2. 1788 32 1. 6939 2. 0369 52 1. 6747 2. 0066 72 1. 6663 1. 9935 92 1. 6616 1. 9861 13 1. 7709 2. 1604 33 1. 6924 2. 0345 53 1. 6741 2. 0057 73 1. 6660 1. 9930 93 1. 6614 1. 9858 14 1. 7613 2. 1448 34 1. 6909 2. 0322 54 1. 6736 2. 0049 74 1. 6657 1. 9925 94 1. 6612 1. 9855 15 1. 7530 2. 1314 35 1. 6896 2. 0301 55 1. 6730 2. 0041 75 1. 6654 1. 9921 95 1. 6610 1. 9852 16 1. 7459 2. 1199 36 1. 6883 2. 0281 56 1. 6725 2. 0032 76 1. 6652 1. 9917 96 1. 6609 1. 9850 17 1. 7396 2. 1098 37 1. 6871 2. 0262 57 1. 6720 2. 0025 77 1. 6649 1. 9913 97 1. 6607 1. 9847 18 1. 7341 2. 1009 38 1. 6859 2. 0244 58 1. 6715 2. 0017 78 1. 6646 1. 9909 98 1. 6606 1. 9845 19 1. 7291 2. 0930 39 1. 6849 2. 0227 59 1. 6711 2. 0010 79 1. 6644 1. 9904 99 1. 6604 1. 9842 20 1. 7247 2. 0860 40 1. 6839 2. 0211 60 1. 6706 2. 0003 80 1. 6641 1. 9901 100 1. 6602 1. 9840
Stating the Conclusion n 6. State the conclusion. We reject the null hypothesis that the bulbs were drawn from a population in which the average life is 1000 hrs. The difference between our sample mean (867) and the mean of the population (1000) is SO different that it is unlikely that our sample could have been drawn from a population with an average life of 1000 hours.
SPSS Results Computers print p values rather than critical values. If p (Sig. ) is less than. 05, it’s significant.
t-tests with Two Samples Independent Samples t-test Dependent Samples t-test
Independent Samples t-test n n Used when we have two independent samples, e. g. , treatment and control groups. Formula is: Terms in the numerator are the sample means. Term in the denominator is the standard error of the difference between means.
Independent samples t-test The formula for the standard error of the difference in means: Suppose we study the effect of caffeine on a motor test where the task is to keep a the mouse centered on a moving dot. Everyone gets a drink; half get caffeine, half get placebo; nobody knows who got what.
Independent Sample Data (Data are time off task) Experimental (Caff) Control (No Caffeine) 12 21 14 18 10 14 8 20 16 11 5 19 3 8 9 12 11 13 15 N 1=9, M 1=9. 778, SD 1=4. 1164 N 2=10, M 2=15. 1, SD 2=4. 2805
Independent Sample Steps(1) 1. Set alpha. Alpha =. 05 2. State Hypotheses. Null is H 0: 1 = 2. Alternative is H 1: 1 2.
Independent Sample Steps(2) 3. Calculate test statistic:
Independent Sample Steps (3) 4. 5. 6. Determine the critical value. Alpha is. 05, 2 tails, and df = N 1+N 2 -2 or 10+92 = 17. The value is 2. 11. State decision rule. If |-2. 758| > 2. 11, then reject the null. Conclusion: Reject the null. the population means are different. Caffeine has an effect on the motor pursuit task.
α(1 tail) 0. 05 0. 025 α(2 tail) 0. 10 0. 050 df df df 1 6. 3138 12. 707 21 1. 7207 2. 0796 41 1. 6829 2. 0196 61 1. 6702 1. 9996 81 1. 6639 1. 9897 2 2. 9200 4. 3026 22 1. 7172 2. 0739 42 1. 6820 2. 0181 62 1. 6698 1. 9990 82 1. 6636 1. 9893 3 2. 3534 3. 1824 23 1. 7139 2. 0686 43 1. 6811 2. 0167 63 1. 6694 1. 9983 83 1. 6634 1. 9889 4 2. 1319 2. 7764 24 1. 7109 2. 0639 44 1. 6802 2. 0154 64 1. 6690 1. 9977 84 1. 6632 1. 9886 5 2. 0150 2. 5706 25 1. 7081 2. 0596 45 1. 6794 2. 0141 65 1. 6686 1. 9971 85 1. 6630 1. 9883 6 1. 9432 2. 4469 26 1. 7056 2. 0555 46 1. 6787 2. 0129 66 1. 6683 1. 9966 86 1. 6628 1. 9879 7 1. 8946 2. 3646 27 1. 7033 2. 0518 47 1. 6779 2. 0117 67 1. 6679 1. 9960 87 1. 6626 1. 9876 8 1. 8595 2. 3060 28 1. 7011 2. 0484 48 1. 6772 2. 0106 68 1. 6676 1. 9955 88 1. 6623 1. 9873 9 1. 8331 2. 2621 29 1. 6991 2. 0452 49 1. 6766 2. 0096 69 1. 6673 1. 9950 89 1. 6622 1. 9870 10 1. 8124 2. 2282 30 1. 6973 2. 0423 50 1. 6759 2. 0086 70 1. 6669 1. 9944 90 1. 6620 1. 9867 11 1. 7959 2. 2010 31 1. 6955 2. 0395 51 1. 6753 2. 0076 71 1. 6666 1. 9939 91 1. 6618 1. 9864 12 1. 7823 2. 1788 32 1. 6939 2. 0369 52 1. 6747 2. 0066 72 1. 6663 1. 9935 92 1. 6616 1. 9861 13 1. 7709 2. 1604 33 1. 6924 2. 0345 53 1. 6741 2. 0057 73 1. 6660 1. 9930 93 1. 6614 1. 9858 14 1. 7613 2. 1448 34 1. 6909 2. 0322 54 1. 6736 2. 0049 74 1. 6657 1. 9925 94 1. 6612 1. 9855 15 1. 7530 2. 1314 35 1. 6896 2. 0301 55 1. 6730 2. 0041 75 1. 6654 1. 9921 95 1. 6610 1. 9852 16 1. 7459 2. 1199 36 1. 6883 2. 0281 56 1. 6725 2. 0032 76 1. 6652 1. 9917 96 1. 6609 1. 9850 17 1. 7396 2. 1098 37 1. 6871 2. 0262 57 1. 6720 2. 0025 77 1. 6649 1. 9913 97 1. 6607 1. 9847 18 1. 7341 2. 1009 38 1. 6859 2. 0244 58 1. 6715 2. 0017 78 1. 6646 1. 9909 98 1. 6606 1. 9845 19 1. 7291 2. 0930 39 1. 6849 2. 0227 59 1. 6711 2. 0010 79 1. 6644 1. 9904 99 1. 6604 1. 9842 20 1. 7247 2. 0860 40 1. 6839 2. 0211 60 1. 6706 2. 0003 80 1. 6641 1. 9901 100 1. 6602 1. 9840
Using SPSS
Independent Samples Exercise Experimental Control 12 20 14 18 10 8 16 14 20 Work this problem by hand with SPSS. You will have to enter the data into SPSS.
SPSS Results
Dependent Samples t-tests
Dependent Samples t-test n Used when we have dependent samples – matched, paired or tied somehow n n Repeated measures Brother & sister, husband & wife Left hand, right hand, etc. Useful to control individual differences. Can result in more powerful test than independent samples t-test.
Dependent Samples t Formulas: t is the difference in means over a standard error. The standard error is found by finding the difference between each pair of observations. The standard deviation of these difference is SDD. Divide SDD by sqrt(number of pairs) to get SEdiff.
Another way to write the formula
Dependent Samples t example Person TX (time in sec) Placebo Difference 1 60 55 5 2 35 20 15 3 70 60 10 4 50 45 5 5 60 60 0 M 55 48 7 13. 23 16. 81 5. 70 SD
Dependent Samples t Example (2) 1. Set alpha =. 05 2. Null hypothesis: H 0: 1 = 2. Alternative is H 1: 1 2. 3. Calculate the test statistic:
Dependent Samples t Example (3) 4. Determine the critical value of t. Alpha =. 05, tails=2 df = N(pairs)-1 =5 -1=4. Critical value is 2. 776 5. Decision rule: is absolute value of sample value larger than critical value? 6. Conclusion. Not (quite) significant. Painfree does not have an effect.
Using SPSS for dependent t -test
- Slides: 28