Presentation is loading. Please wait.

Presentation is loading. Please wait.

Student’s t-test. This will happen occasionally, just due to chance. 5% of the time, α From Last Week.

Similar presentations


Presentation on theme: "Student’s t-test. This will happen occasionally, just due to chance. 5% of the time, α From Last Week."— Presentation transcript:

1 Student’s t-test

2 This will happen occasionally, just due to chance. 5% of the time, α From Last Week

3 This will happen occasionally, just due to chance. Rate traditionally not specified, β

4 Power, 1-β

5 Significance level 1-α

6 To calculate Z,.. we need to know 3 things: 1.Sample mean 2.Population or Hypothesized mean 3.Standard Error of the mean

7 …and where do we get those values? 1.Sample mean - calculate from your sample 2.Hypothesized mean - specify based on your research question 3.Standard Error of the mean - typically don’t have, so must calculate the sample standard deviation of the mean, or standard error.

8 We know how to calculate … Population standard error Sample standard error is the same

9 So now, … Calculate Z as: But is a poor estimator of Requires HUGE sample size to be unbiased.

10 The solution ??? Toss Z!!

11 I said …. is a poor estimator of Also, as sample size  :

12 The consequences of this are: For every n, there is a unique distribution of t. As n approaches infinity, the t-distribution becomes more and more like the Z-distribution.

13 = 1 = 3 =  Degrees of Freedom ( ) influence the shape of the t-distribution. = n-1

14 0.025 Z 1.96 -1.96 0 Critical Z’s …

15 0.025 t 0 Critical t’s … ??

16 0.025 t 4.303-4.303 0 = 2 0.025 t 2.064-2.0640 = 24 Critical t’s …

17 T-table from Samuels and Witmer

18 Hypothesis testing using t Calculating t and comparing it to t from a table –if |t observed | < t critical ; do not reject H 0 –if |t observed |  t critical ; reject H 0 Calculating t and finding the probability of … –p(t  observed value) =... Alpha = 0.05

19 2-tail testIn a 2-tail test with = 9, our critical value of t is: 2.262 We would write this as: –t 0.05(2), 9 = 2.262 0.025 t 2.262-2.2620 = 9

20 Alpha = 0.05 2-tail testIn a 2-tail test with = 24, our critical value of t is: 2.064 We would write this as: –t 0.05(2), 24 = 2.064 0.025 t 2.064-2.0640 = 24

21 Crabs held at 24.3 o C. H o :  = 24.3 o C H A :   24.3 o C  = 0.05 n = 25 ( = 24)

22 Crabs held at 24.3 o C.

23 Therefore, reject H o, the sample likely came from a population having a mean that is not 24.3 o C.

24 In the last example... We asked “Is there a difference?” –2-tailed test We can also ask “Is it BIGGER or smaller than some hypothesized value –1-tailed test

25 Atkins Mice To test the Atkins diet you put a set of mice on a low carb food regime If it works, all mice should lose weight –weight gain on diet should be negative, <0

26 Atkins mice H o :   0 H A :  < 0  = 0.05 n = 12 ( = 11)

27 Atkins mice Therefore, reject Ho, likely does not come from a population ….

28 Confidence Limits When we set  = 0.05, if we have a population with mean  we expect that 5% of all samples drawn randomly from the population, will produce t values that are –larger than t 0.05(2), –smaller than - t 0.05(2), –leaving 95% of the remaining samples to have means that yield t’s between - t 0.05(2), and t 0.05(2),

29 The probability of is 95%. Confidence Limits 95% of all sample means should produce t’s that lie between - t 0.05(2), and t 0.05(2),.

30 A little math magic...

31 95% probability that the interval includes  “95% confidence interval” Lower confidence limit Upper confidence limit

32 More magic …

33 Crabs held at 24.3 o C

34 25.5924.47 95% confident that the population mean lies between these values 24.3 95% Confidence interval Does not include the hypothesized μ

35 As this gets bigger, this gets smaller. The Magnitude of Confidence Limits is Influenced by Sample Size

36 For example Population N=1000  =25  =1 Draw random samples of: n=100 n=50 n=25 n=10 from the population. n Mean 95% CILowerUpper 10024.840790.181624.6591825.02239 5024.912410.3199624.5924525.23237 2524.867190.4014224.4657725.26861 1025.162120.85924.3031226.02112 The Magnitude of Confidence Limits …

37 So far, we’ve looked at … One sample tests, Z and t comparing a sample to some specified value.

38 Hypotheses: 2-tailed H o :  A =  B H A :  A   B 1-tailed H o :  A   B H A :  A <  B H o :  A   B H A :  A >  B or Two-sample t-test testing for differences between two means.

39 Basically, what we want To know is, “ Is it likely that two samples were drawn from the same population? Or is it likely that they were drawn from two different populations?

40

41 Calculating t for a 2-sample test Recall that

42 H o :  A =  B H A :  A   B H o :  A -  B = 0 H A :  A -  B  0 Standard error of the difference between the means

43

44 Hypotheses: 2-tailed H o :  A =  B (  A -  B = 0) H A :  A   B (  A -  B  0) 1-tailed H o :  A   B (  A -  B  0) H A :  A <  B (  A -  B <0) H o :  A   B (  A -  B  0) H A :  A >  B (  A -  B >0) Reject H o if Reject H o if

45

46 blood clotting times in humans given two experimental drugs. Drug B 8.8 8.4 7.9 8.7 9.1 9.6 Drug G 9.9 9.0 11.1 9.6 8.7 10.4 9.5

47

48 Drug B 8.8 8.4 7.9 8.7 9.1 9.6 Drug G 9.9 9.0 11.1 9.6 8.7 10.4 9.5 H o :  DrugB =  DrugG H A :  DrugB   DrugG What do we need? Xbar for each drug SS for each drug Pooled variance StdErr of Diff b/w Means

49 Time B SS DrugB SS DrugG Mean Time G (X i -8.75) (X i -9.74)

50 Pooled Variance,

51 Standard Error of the Difference Between the Means:

52 Drug B 8.8 8.4 7.9 8.7 9.1 9.6 Drug G 9.9 9.0 11.1 9.6 8.7 10.4 9.5 H o :  DrugB =  DrugG H A :  DrugB   DrugG

53 What value do we use for degrees of freedom? Our total degrees of freedom = sum of degrees of freedom for each drug.

54 Therefore, reject H o, there is a difference between the means.

55 Drug B 8.8 8.4 7.9 8.7 9.1 9.6 Drug G 9.9 9.0 11.1 9.6 8.7 10.4 9.5 H o :  DrugB =  DrugG H A :  DrugB   DrugG 2 Sample, 2 tail t-test --> Reject H o

56 2 Sample, 1 tail t-test Testing the prediction that dietary supplements increase growth rate in lab mice. Control Group 175 132 218 151 200 219 234 149 Treatment Group 142 311 337 262 302 195 253 199 H o :  treatment   control H A :  treatment >  control

57 Reject H o, dietary supplements increased growth rate

58 Paired sample t-test --> examine the difference between means that are not drawn from independent samples --> often used in before and after experiments The 2-sample tests that we have looked at assumes that the 2 samples are independent

59 Before 36 60 44 119 35 51 77 After 45 73 46 124 33 57 83 Effects of Monoxodil on density of active hair follicles Guy# 1 2 3 4 5 6 7 What we are interested in is: Has there been an appreciable difference difference within the pairing?

60 Before 36 60 44 119 35 51 77 After 45 73 46 124 33 57 83 Effects of Monoxodil on density of active hair follicles Guy# 1 2 3 4 5 6 7 The first step is to calculate the difference between the after and before. After-Before 9 13 2 5 -2 6 H o :  before -  after = 0 H A :  before -  after  0 H o :  difference = 0 H A :  difference  0 or (looks a lot like a one sample test)

61 Before 36 60 44 119 35 51 77 After 45 73 48 124 33 57 83 Guy# 1 2 3 4 5 6 7 After-Before 9 13 4 5 -2 6 Reject H o Standard error of the mean difference

62 Before 36 60 44 119 35 51 77 After 45 73 48 124 33 57 83 Guy# 1 2 3 4 5 6 7 After-Before 9 13 4 5 -2 6 We could have set this up as a 1-tail test as well. H o :  difference  0 H A :  difference > 0 Reject H o


Download ppt "Student’s t-test. This will happen occasionally, just due to chance. 5% of the time, α From Last Week."

Similar presentations


Ads by Google