65
Student t- test Unit 8 strand

Student t-test

Embed Size (px)

DESCRIPTION

Studnet's t-test for

Citation preview

Page 1: Student t-test

Student t-testUnit 8 strand

Page 2: Student t-test

Student’s t-test

“Student” was W. S. Gossett. He published his test anonymously as ‘Student’ because he was working for the brewer’s Guinness and had to keep the fact they were suing statistics a secret

Page 3: Student t-test

Student’s t-test

The test is used to compare samples from two different batches.

It is usually used with small (<30) samples that are normally distributed.

Page 4: Student t-test

There are two types of t-test:

Matched pairs and independent pairs

If there is some link between the data then use the matched pairs test (eg a ‘before’ and ‘after’)

If there is no link between the data then use the independent pairs test

Page 5: Student t-test

DFO 8 12 11 6 9 11 7 8 10 9DFO+ninhydrin

10 15 12 6 13 14 9 9 15 12

QuestionIn an investigation to determine the effectiveness of sequencing of fingerprints 10 prints are taken enhanced with DFO and then with ninhydrin. The points of detail at each stage are recorded. Is there a difference at the 95% confidence level?

Page 6: Student t-test

t-test for matched pairs

1. Set up the null and alternative hypothesis:

Page 7: Student t-test

t-test for matched pairs

H0 there is no difference in the number of minutae when using ninhydrin

HA there are more minutae observed after the enhancement of ninhydrin.

1. Set up the null and alternative hypothesis:

Page 8: Student t-test

t-test for matched pairs

H0 there is no difference in the number of minutae when using ninhydrin

HA there are more minutae observed after the enhancement of ninhydrin.

This is a one-tail test.

We are testing at the 95% or 5% (0.05) level

1. Set up the null and alternative hypothesis:

Page 9: Student t-test

t-test for matched pairs

1. Set up the null and alternative hypothesis

2. Calculate the difference between the pairs in the sample

Page 10: Student t-test

t-test for matched pairs

1. Set up the null and alternative hypothesis

DFO 8 12 11 6 9 11 7 8 10 9DFO+ninhydrin 10 15 12 6 13 14 9 9 15 12Difference (D)

2. Calculate the difference between the pairs in the sample

Page 11: Student t-test

t-test for matched pairs

1. Set up the null and alternative hypothesis

DFO 8 12 11 6 9 11 7 8 10 9 TotalDFO+ninhydrin 10 15 12 6 13 14 9 9 15 12Difference (D) 2 3 1 0 4 3 2 1 5 3 24

2. Calculate the difference between the pairs in the sample

Page 12: Student t-test

t-test for matched pairs

1. Set up the null and alternative hypothesis

2. Calculate the difference between the pairs in the sample

3. Calculate the mean of the differences

Page 13: Student t-test

t-test for matched pairs

1. Set up the null and alternative hypothesis

2. Calculate the difference between the pairs in the sample

3. Calculate the mean of the differences

= 2.4

Page 14: Student t-test

t-test for matched pairs

1. Set up the null and alternative hypothesis

2. Calculate the difference between the pairs in the sample

3. Calculate the mean of the differences

= 2.4

Page 15: Student t-test

t-test for matched pairs

1. Set up the null and alternative hypothesis

2. Calculate the difference between the pairs in the sample

3. Calculate the mean of the differences

4. Calculate the standard deviation of the difference

Page 16: Student t-test

t-test for matched pairs

1. Set up the null and alternative hypothesis

2. Calculate the difference between the pairs in the sample

3. Calculate the mean of the differences

4. Calculate the standard deviation of the difference

Page 17: Student t-test

t-test for matched pairs

1. Set up the null and alternative hypothesis

2. Calculate the difference between the pairs in the sample

3. Calculate the mean of the differences

4. Calculate the standard deviation of the difference

= 1.51

Page 18: Student t-test

t-test for matched pairs

1. Set up the null and alternative hypothesis

2. Calculate the difference between the pairs in the sample

3. Calculate the mean of the differences

4. Calculate the standard deviation of the difference

5. Calculate the standard error

Page 19: Student t-test

t-test for matched pairs

1. Set up the null and alternative hypothesis

2. Calculate the difference between the pairs in the sample

3. Calculate the mean of the differences

4. Calculate the standard deviation of the difference

5. Calculate the standard error

Page 20: Student t-test

t-test for matched pairs

1. Set up the null and alternative hypothesis

2. Calculate the difference between the pairs in the sample

3. Calculate the mean of the differences

4. Calculate the standard deviation of the difference

5. Calculate the standard error

= = 0.478

Page 21: Student t-test

t-test for matched pairs

1. Set up the null and alternative hypothesis

2. Calculate the difference between the pairs in the sample

3. Calculate the mean of the differences

4. Calculate the standard deviation of the difference

5. Calculate the standard error6. Calculate the value of t

Page 22: Student t-test

t-test for matched pairs

1. Set up the null and alternative hypothesis

2. Calculate the difference between the pairs in the sample

3. Calculate the mean of the differences

4. Calculate the standard deviation of the difference

5. Calculate the standard error6. Calculate the value of t

Page 23: Student t-test

t-test for matched pairs

1. Set up the null and alternative hypothesis

2. Calculate the difference between the pairs in the sample

3. Calculate the mean of the differences

4. Calculate the standard deviation of the difference

5. Calculate the standard error6. Calculate the value of t

= = 5.0

Page 24: Student t-test

t-test for matched pairs

1. Set up the null and alternative hypothesis

2. Calculate the difference between the pairs in the sample

3. Calculate the mean of the differences

4. Calculate the standard deviation of the difference

5. Calculate the standard error6. Calculate the value of t

7. Calculate the number of degrees of freedom (DoF) and find the critical value

Page 25: Student t-test

t-test for matched pairs

1. Set up the null and alternative hypothesis

2. Calculate the difference between the pairs in the sample

3. Calculate the mean of the differences

4. Calculate the standard deviation of the difference

5. Calculate the standard error6. Calculate the value of t

7. Calculate the number of degrees of freedom (DoF) and find the critical value

DoF = No of pairs of data – 1

Page 26: Student t-test

t-test for matched pairs

1. Set up the null and alternative hypothesis

2. Calculate the difference between the pairs in the sample

3. Calculate the mean of the differences

4. Calculate the standard deviation of the difference

5. Calculate the standard error6. Calculate the value of t

7. Calculate the number of degrees of freedom (DoF) and find the critical value

DoF = No of pairs of data – 1

10-1 = 9

= n – 1

Page 27: Student t-test

t-test for matched pairs

1. Set up the null and alternative hypothesis

2. Calculate the difference between the pairs in the sample

3. Calculate the mean of the differences

4. Calculate the standard deviation of the difference

5. Calculate the standard error6. Calculate the value of t7. Calculate the number of degrees of freedom (DoF) and 8. find the critical value

Page 28: Student t-test

t-test for matched pairs

1. Set up the null and alternative hypothesis

2. Calculate the difference between the pairs in the sample

3. Calculate the mean of the differences

4. Calculate the standard deviation of the difference

5. Calculate the standard error6. Calculate the value of t

7. Calculate the number of degrees of freedom (DoF) and 8. find the critical value

Page 29: Student t-test

t-test for matched pairs

1. Set up the null and alternative hypothesis

2. Calculate the difference between the pairs in the sample

3. Calculate the mean of the differences

4. Calculate the standard deviation of the difference

5. Calculate the standard error6. Calculate the value of t

7. Calculate the number of degrees of freedom (DoF) and 8. find the critical value

Page 30: Student t-test

t-test for matched pairs

1. Set up the null and alternative hypothesis

2. Calculate the difference between the pairs in the sample

3. Calculate the mean of the differences

4. Calculate the standard deviation of the difference

5. Calculate the standard error6. Calculate the value of t

7. Calculate the number of degrees of freedom (DoF) and 8. find the critical value

Page 31: Student t-test

t-test for matched pairs

1. Set up the null and alternative hypothesis

2. Calculate the difference between the pairs in the sample

3. Calculate the mean of the differences

4. Calculate the standard deviation of the difference

5. Calculate the standard error6. Calculate the value of t

7. Calculate the number of degrees of freedom (DoF) and 8. find the critical value

Page 32: Student t-test

t-test for matched pairs

1. Set up the null and alternative hypothesis

2. Calculate the difference between the pairs in the sample

3. Calculate the mean of the differences

4. Calculate the standard deviation of the difference

5. Calculate the standard error6. Calculate the value of t

9. Determine if there is a difference or not

7. Calculate the number of degrees of freedom (DoF) and 8. find the critical value

Page 33: Student t-test

t-test for matched pairs

1. Set up the null and alternative hypothesis

2. Calculate the difference between the pairs in the sample

3. Calculate the mean of the differences

4. Calculate the standard deviation of the difference

5. Calculate the standard error6. Calculate the value of t

9. Determine if there is a difference or not

7. Calculate the number of degrees of freedom (DoF) and 8. find the critical value

Page 34: Student t-test

t-test for matched pairs

1. Set up the null and alternative hypothesis

2. Calculate the difference between the pairs in the sample

3. Calculate the mean of the differences

4. Calculate the standard deviation of the difference

5. Calculate the standard error6. Calculate the value of t

9. Determine if there is a difference or not

t > tcritical (5.0 > 1.833)

7. Calculate the number of degrees of freedom (DoF) and 8. find the critical value

Page 35: Student t-test

t-test for matched pairs

1. Set up the null and alternative hypothesis

2. Calculate the difference between the pairs in the sample

3. Calculate the mean of the differences

4. Calculate the standard deviation of the difference

5. Calculate the standard error6. Calculate the value of t

9. Determine if there is a difference or not

t > tcritical (5.0 > 1.833)

So, the null hypothesis is rejected and the alternative hypothesis is accepted.

The ninhydrin does make a positive difference

7. Calculate the number of degrees of freedom (DoF) and 8. find the critical value

Page 36: Student t-test

t-test independent samples

If there is no before and after relationship between the samples then the independent samples test is used.

Page 37: Student t-test

t-test independent samples

If there is no before and after relationship between the samples then the independent samples test is used.

Page 38: Student t-test

t-test independent samples

ExampleSome brown dog hairs were found on the clothing of a victim at a crime scene involving a dog.The five of the hairs were measured: 46, 57, 54, 51, 38 μm.A suspect is the owner of a dog with similar brown hairs. A sample of the hairs has been taken and their widths measured: 31, 35, 50, 35, 36 μm.Is it possible that the hairs found on the victim were left by the suspect’s dog? Test at the %5 level.

[From D. Lucy Introduction to Statistics for Forensic Scientists Chichester: Wiley, 2005 p. 44.]

Page 39: Student t-test

t-test independent samples

1. Calculate the mean and standard deviation for the data sets

Page 40: Student t-test

t-test independent samples

Dog A Dog B

46 31

57 35

54 50

51 35

38 36

Total

Mean

Standard deviation

1. Calculate the mean and standard deviation for the data sets

Page 41: Student t-test

t-test independent samples

Dog A Dog B

46 31

57 35

54 50

51 35

38 36

Total 246 187

Mean 49.2 37.4

Standard deviation

7.463 7.301

1. Calculate the mean and standard deviation for the data sets

Page 42: Student t-test

t-test independent samples

1. Calculate the mean and standard deviation for the data sets

2. Calculate the magnitude of the difference between the two means

49.2 – 37.4 = 11.8

.

Page 43: Student t-test

t-test independent samples

1. Calculate the mean and standard deviation for the data sets

2. Calculate the magnitude of the difference between the two means

3. Calculate the standard error in the difference

.

Page 44: Student t-test

t-test independent samples

1. Calculate the mean and standard deviation for the data sets

2. Calculate the magnitude of the difference between the two means.│

3. Calculate the standard error in the difference

.

Page 45: Student t-test

t-test independent samples

1. Calculate the mean and standard deviation for the data sets

2. Calculate the magnitude of the difference between the two means

3. Calculate the standard error in the difference

.

=

= 4.669 ≈ 4.67 (3 sf)

Page 46: Student t-test

t-test independent samples

1. Calculate the mean and standard deviation for the data sets

2. Calculate the magnitude of the difference between the two means

3. Calculate the standard error in the difference

.

4. Calculate the value of t

Page 47: Student t-test

t-test independent samples

1. Calculate the mean and standard deviation for the data sets

2. Calculate the magnitude of the difference between the two means

3. Calculate the standard error in the difference

.

t = difference between the means ÷ standard error in the difference

4. Calculate the value of t:

Page 48: Student t-test

t-test independent samples

1. Calculate the mean and standard deviation for the data sets

2. Calculate the magnitude of the difference between the two means

3. Calculate the standard error in the difference

.

t = difference between the means ÷ standard error in the difference

4. Calculate the value of t:

4.669 = 2.527 ≈ 2.53 (3 sig fig)

11.8

Page 49: Student t-test

t-test independent samples

1. Calculate the mean and standard deviation for the data sets

2. Calculate the magnitude of the difference between the two means

3. Calculate the standard error in the difference

.

4. Calculate the value of t:

5. Calculate the degrees of freedom

Page 50: Student t-test

t-test independent samples

1. Calculate the mean and standard deviation for the data sets

2. Calculate the magnitude of the difference between the two means

3. Calculate the standard error in the difference

.

4. Calculate the value of t:

5. Calculate the degrees of freedom = n1 + n2 - 2

Page 51: Student t-test

t-test independent samples

1. Calculate the mean and standard deviation for the data sets

2. Calculate the magnitude of the difference between the two means

3. Calculate the standard error in the difference

.

4. Calculate the value of t:

5. Calculate the degrees of freedom = n1 + n2 - 2

5 + 5 - 2 = 8

Page 52: Student t-test

t-test independent samples

1. Calculate the mean and standard deviation for the data sets

2. Calculate the magnitude of the difference between the two means

3. Calculate the standard error in the difference

.

4. Calculate the value of t:

5. Calculate the degrees of freedom

6. Find the critical value for the particular significance you are working to from the table

Page 53: Student t-test

t-test independent samples

1. Calculate the mean and standard deviation for the data sets

2. Calculate the magnitude of the difference between the two means

3. Calculate the standard error in the difference

.

4. Calculate the value of t:

5. Calculate the degrees of freedom

6. Find the critical value for the particular significance you are working to from the table

Page 54: Student t-test

t-test independent samples

1. Calculate the mean and standard deviation for the data sets

2. Calculate the magnitude of the difference between the two means

3. Calculate the standard error in the difference

.

4. Calculate the value of t:

5. Calculate the degrees of freedom

6. Find the critical value for the particular significance you are working to and find the critical value from the table

Page 55: Student t-test

t-test independent samples

1. Calculate the mean and standard deviation for the data sets

2. Calculate the magnitude of the difference between the two means

3. Calculate the standard error in the difference

.

4. Calculate the value of t:

5. Calculate the degrees of freedom

6. Find the critical value for the particular significance you are working to and find the critical value from the table

Page 56: Student t-test

t-test independent samples

1. Calculate the mean and standard deviation for the data sets

2. Calculate the magnitude of the difference between the two means

3. Calculate the standard error in the difference

.

4. Calculate the value of t:

5. Calculate the degrees of freedom

6. Find the critical value for the particular significance you are working to from the table

At the 0.05 level tcrit = 2.306

Page 57: Student t-test

t-test independent samples

1. Calculate the mean and standard deviation for the data sets

2. Calculate the magnitude of the difference between the two means

3. Calculate the standard error in the difference

.

4. Calculate the value of t:

5. Calculate the degrees of freedom

6. Find the critical value for the particular significance you are working to and find the critical value from the table

If t < critical value then there is no significant difference between the two sets of dataIf t > critical value then there is a significant difference between the two sets of data

Page 58: Student t-test

t-test independent samples

1. Calculate the mean and standard deviation for the data sets

2. Calculate the magnitude of the difference between the two means

3. Calculate the standard error in the difference

.

4. Calculate the value of t:

5. Calculate the degrees of freedom

6. Find the critical value for the particular significance you are working to and find the critical value from the table

If t < critical value then there is no significant difference between the two sets of dataIf t > critical value then there is a significant difference between the two sets of data

So, at 0.05 level there is a significant difference between the two data sets.So it could not come from the same dog.

Page 59: Student t-test

t-test independent samples

1. Calculate the mean and standard deviation for the data sets

2. Calculate the magnitude of the difference between the two means

3. Calculate the standard error in the difference

.

4. Calculate the value of t:

5. Calculate the degrees of freedom

6. Find the critical value for the particular significance you are working to and find the critical value from the table

Page 60: Student t-test

t-test independent samples

. Group A

(leading questions)Group B(control)

2 33 54 04 32 44 03

Page 61: Student t-test

t-test independent samples

. Group A

(leading questions)Group B(control)

2 33 54 04 32 44 03

Mean = 3.143SD= 0.8997

Mean = 2.50SD = 2.07

Page 62: Student t-test

t-test independent samples

. Group A

(leading questions)Group B(control)

2 33 54 04 32 44 03

Mean = 3.143SD= 0.8997

Mean = 2.50SD = 2.07

Diff of means = 0.64SE of diff = 0.861DoF = 11t = 0.7433

Page 63: Student t-test

t-test independent samples

.

DoF = 11t = 0.7433

Page 64: Student t-test

t-test independent samples

.

DoF = 11t = 0.7433

Page 65: Student t-test

t-test independent samples

.

DoF = 11t = 0.7433

t < tcritical at 5% level, 2-tailThere is no significant difference between the data test