A t-test is a hypothesis test in which the test statistic follows a Student’s t-distribution under the null hypothesis. There are several different test statistics that fall into the category of a t-test.

One-Sample t-test

x 0 s n df n 1

t

Independent Two-Sample t-test

t

x1 x2

2

sx1x2 n

1 2

2

sx1 sx2

2

df 2n 2 sx1x2

Unequal Sample Size Two-Sample t-test

t

x1 x2

1 1 sx1x2 n1 n2

sx1x2

n1 1 sx2 n2 1 sx2

1

2

n1 n2 2

df n1 n2 2

Unequal Sample Size and Unequal Variance Two-Sample t-test

t

x1 x2 sx1x2 sx1x2

df

2 s12 s2

n1 n2

2

s12 s2

n1 n2

2

s 2 2 s 2 2

2

1

n1 n2

n 1 n 1

2

1

Dependent t-test for two samples xD D sD n df n 1

t

Some assumptions are made in order to use the t-test.

Assumptions for t-test

1. The data comes from normal distribution or the sample size is greater than 30.

2. The sample is a simple random sample

The t-test is a hypothesis test. There are seven steps for a hypothesis test.

1.

2.

3.

4.

5.

6.

7.

State the null hypothesis

State the alternative hypothesis

State the level of significance

State the test statistic

Calculate

Statistical Conclusion

Experimental Conclusion

Example One-Sample t-test

The age of the head of household residents of Phoenix, Arizona has increased in the recent years. Ten years ago the average age of head of household in Phoenix, Arizona was 33. A random sample of 40 head of household residents in Phoenix, Arizona was taken and the ages were recorded as follows.

25

46

63

37

72

20

47

41

59

64

32

37

80

59

63

31

38

35

45

36

45

22

36

44

48

69

31

36

34

37

70

33

65

29

31

76

51

25

27

21

27

We wish to use this data to test if the hypothesis that the average age of head of household residents