Quiz STAT

profileDanyah
lecture__9_t_tests_sp15.pptx

Statistical Tests

Types of Statistical Tests

More powerful

Requires certain assumptions:

Normality

Homoscedasticity

(Equal variances)

If assumptions not fulfilled:

Try to transform

If still not fulfilled, use non-parametric tests

2

Statistical

test

Non-Parametric

Parametric

Testing for mean

Only one sample is taken

Involves one quantitative variable

The null hypothesis tests that the mean of a population parameter for a given variable is equal to one numeric value

Assumptions: We will assume the numeric variable is approximately normal.

One Sample T-test

Note: If assumption is not fulfilled, use median test

Example: It is believed that the mean age of smokers in San Bernardino is 47. Researchers from LLU believe that the average age is different than 47. In order to test this hypothesis the researchers took a sample of 20 random smokers and found that average age is 51 with a standard deviation of 10. What should they conclude?

H0: µ = 47

HA: µ ≠ 47

1.Confidence Interval Method

95% confidence interval is (46.32, 55.68)

Decision: Since the null value, 47, falls within the confidence interval, we fail to reject the null hypothesis.

Conclusion: We are 95% confident that the mean age of San Bernardino smokers was not significantly different from 47.

One Sample T-test

H0: µ = 47 years

α = 0.05

df = 19

X = 51

s = 10

n = 20

H0

CV

CV

Fail to Reject

2.093

-2.093

2. Test Statistic Method

Decision: Since the test statistic, 1.79 is in the fail to reject region, we fail to reject the null hypothesis

FTR

-2.093 2.093

ts= 1.79

α /2 = 0.025

p-value = Area beyond test statistic

3. P-Value Method

Decision: Since the p-value is > .05, we fail to reject the null hypothesis

Two Independent Sample T-test

Used when comparing the averages of two samples

Involves one quantitative and one qualitative variables where the qualitative variable has two categories

Assumptions:

the samples are randomly selected from normally distributed populations

the samples are selected in an independent manner

- variances are equal

Note: If assumption is not fulfilled, use Mann-Whitney Test

9

Example: The data below shows the average working hours per week for nurses and physicians at local hospital.

Are these averages significantly different at alpha of 0.05?

Solution:

OR

Degree of freedom independent sample t-test (df)

10

1a. Confidence Interval

Decision: Since the 95% includes the H0 value of zero, we will fail to reject the null hypothesis

Conclusion: The average hours per week of the nurses and physicians were not significantly different

11

1b. Confidence Interval

Nurses

Physicians

12

1b. Confidence Interval

Decision: Since the 95% overlap, we fail to reject the null hypothesis

Conclusion: The average hours per week of the nurses and physicians were not significantly different

Physicians

Nurses

13

2. Test Statistic

Decision: Since the test statistic is in the fail to reject region, we will fail to reject the null hypothesis

Conclusion: The average hours per week of the nurses and physicians are not significantly different

Note: CV = 2.074

FTR

ts CV

14

3. P-value

Decision: Since the p-value is greater than 0.05, we fail to reject the null hypothesis

Conclusion: The average hours per week of the nurses and physicians were not significantly different

Alpha = 0.05

15

Paired T-test

Also known as two dependent samples t-test

Used when comparing the averages of two samples

The two samples have to be dependent

Usually used in a before and after studies

Involves two quantitative variables that are dependent on each other

16

Paired T-test

Assumptions:

- The frequency distribution of the population of differences is approximately normal

Note:

- Typically, when both a pretest and a posttest are used, the same subjects are used in the study. Thus, this kind of sampling plan usually leads to dependent samples.

- If assumption is not fulfilled, use Wilcoxon Sign Test

17

Example: Salt-free diets are often prescribed for people with high blood pressure. The following data was obtained from an experiment designed to estimate the reduction in diastolic blood pressure as a result of following a salt-free diet for two weeks. Assume diastolic readings to be normally distributed. Is there a significant reduction in diastolic blood pressure.

Solution:

OR

18

Confidence Interval

Decision: Since the 95% CI of the mean difference includes the null value (Zero), we fail to reject the null hypothesis

Conclusion: There was no a significant reduction in diastolic blood pressure after following a salt-free diet for two weeks

Descriptive statistics for the difference

19

2. Test Statistic

Decision: Since the test statistic is in the fail to reject region, we will fail to reject the null hypothesis

FTR

CV

ts

Note: CV = 2.365

Conclusion: There was no a significant reduction in diastolic blood pressure after following a salt-free diet for two weeks

20

3. P-value

Decision: Since the p-value is greater than 0.05, we fail to reject the null hypothesis

Alpha = 0.05

Conclusion: There was no significant reduction in diastolic blood pressure after following a salt-free diet for two weeks

21

Source: Morton, D.P., et al., The effectiveness of the Complete Health Improvement Program (CHIP) in Australasia for reducing selected chronic disease risk factors: a feasibility study. N Z Med J, 2013. 126(1370): p. 43-54.

22

Source: den Otter, J.J., et al., How to avoid underdiagnosed asthma/chronic obstructive pulmonary disease? J Asthma, 1998. 35(4): p. 381-7.

23

20

10

51

=

=

=

n

s

x

10

512.093514.68

20

m

=±=±

/2

S

xt

n

a

m

n

s

x

t

s

m

-

=

79

.

1

20

10

47

51

=

-

=

/20.025

a

=

Employees

n

Average Hours/WeekStandard Deviation

Nurses1248.26.7

Physicians1244.12.3

0

:

nursesphysicians

H

mm

=

0

:0

nursesphysicians

H

mm

-=

12

(1)(1)

nn

=-+-

Sheet1

Employees n Average Hours/Week Standard Deviation
Nurses 12 48.2 6.7
Physicians 12 44.1 2.3
&A
Page &P

Sheet2

&A
Page &P

Sheet3

&A
Page &P

Sheet4

&A
Page &P

Sheet5

&A
Page &P

Sheet6

&A
Page &P

Sheet7

&A
Page &P

Sheet8

&A
Page &P

Sheet9

&A
Page &P

Sheet10

&A
Page &P

Sheet11

&A
Page &P

Sheet12

&A
Page &P

Sheet13

&A
Page &P

Sheet14

&A
Page &P

Sheet15

&A
Page &P

Sheet16

&A
Page &P

22

12

12

/2

12

22

()

6.72.3

(48.2-44.1)2.07394.14.24

1212

(-0.14, 8.34)

ss

xxt

nn

a

æöæö

-±+

ç÷ç÷

èøèø

æöæö

±+=±

ç÷ç÷

èøèø

12

(1)(1)(121)(121)22

dfnn

=-+-=-+-=

Sheet1

Employees n Average Hours/Week Standard Deviation
Nurses 12 48.2 6.7
Physicians 12 44.1 2.3
&A
Page &P

Sheet2

&A
Page &P

Sheet3

&A
Page &P

Sheet4

&A
Page &P

Sheet5

&A
Page &P

Sheet6

&A
Page &P

Sheet7

&A
Page &P

Sheet8

&A
Page &P

Sheet9

&A
Page &P

Sheet10

&A
Page &P

Sheet11

&A
Page &P

Sheet12

&A
Page &P

Sheet13

&A
Page &P

Sheet14

&A
Page &P

Sheet15

&A
Page &P

Sheet16

&A
Page &P

Employees

n

Average Hours/WeekStandard Deviation95% CI

Nurses1248.26.7

43.94,52.46

Physicians1244.12.3

42.64,45.56

6.7

48.22.201

12

48.24.26

(43.94,52.46)

m

m

m

=

2.3

44.12.201

12

44.11.46

(42.64,45.56)

m

m

m

=

Sheet1

Employees n Average Hours/Week Standard Deviation 95% CI
Nurses 12 48.2 6.7 43.94,52.46
Physicians 12 44.1 2.3 42.64,45.56
&A
Page &P

Sheet2

&A
Page &P

Sheet3

&A
Page &P

Sheet4

&A
Page &P

Sheet5

&A
Page &P

Sheet6

&A
Page &P

Sheet7

&A
Page &P

Sheet8

&A
Page &P

Sheet9

&A
Page &P

Sheet10

&A
Page &P

Sheet11

&A
Page &P

Sheet12

&A
Page &P

Sheet13

&A
Page &P

Sheet14

&A
Page &P

Sheet15

&A
Page &P

Sheet16

&A
Page &P

Sheet1

Employees n Average Hours/Week Standard Deviation 95% CI
Nurses 12 48.2 6.7 43.94,52.46
Physicians 12 44.1 2.3 42.64,45.56
&A
Page &P

Sheet2

&A
Page &P

Sheet3

&A
Page &P

Sheet4

&A
Page &P

Sheet5

&A
Page &P

Sheet6

&A
Page &P

Sheet7

&A
Page &P

Sheet8

&A
Page &P

Sheet9

&A
Page &P

Sheet10

&A
Page &P

Sheet11

&A
Page &P

Sheet12

&A
Page &P

Sheet13

&A
Page &P

Sheet14

&A
Page &P

Sheet15

&A
Page &P

Sheet16

&A
Page &P

12

12

22

22

12

12

()()

(48.244.1)0

4.1/2.042

6.72.3

1212

s

xx

t

ss

nn

mm

---

--

====

æöæöæöæö

+

+

ç÷ç÷ç÷ç÷

èøèø

èøèø

Sheet1

Employees n Average Hours/Week Standard Deviation
Nurses 12 48.2 6.7
Physicians 12 44.1 2.3
&A
Page &P

Sheet2

&A
Page &P

Sheet3

&A
Page &P

Sheet4

&A
Page &P

Sheet5

&A
Page &P

Sheet6

&A
Page &P

Sheet7

&A
Page &P

Sheet8

&A
Page &P

Sheet9

&A
Page &P

Sheet10

&A
Page &P

Sheet11

&A
Page &P

Sheet12

&A
Page &P

Sheet13

&A
Page &P

Sheet14

&A
Page &P

Sheet15

&A
Page &P

Sheet16

&A
Page &P

Nurses1248.26.7

Physicians1244.12.3

P-value

0.12

Sheet1

Employees n Average Hours/Week Standard Deviation
Nurses 12 48.2 6.7
Physicians 12 44.1 2.3
P-value 0.12
&A
Page &P

Sheet2

&A
Page &P

Sheet3

&A
Page &P

Sheet4

&A
Page &P

Sheet5

&A
Page &P

Sheet6

&A
Page &P

Sheet7

&A
Page &P

Sheet8

&A
Page &P

Sheet9

&A
Page &P

Sheet10

&A
Page &P

Sheet11

&A
Page &P

Sheet12

&A
Page &P

Sheet13

&A
Page &P

Sheet14

&A
Page &P

Sheet15

&A
Page &P

Sheet16

&A
Page &P

Before9310687921029588110

After9210289921019688105

0

:

beforeafter

H

mm

=

0

:0

afterbefore

H

mm

-=

Sheet1

Before 93 106 87 92 102 95 88 110
After 92 102 89 92 101 96 88 105
&A
Page &P

Sheet2

&A
Page &P

Sheet3

&A
Page &P

Sheet4

&A
Page &P

Sheet5

&A
Page &P

Sheet6

&A
Page &P

Sheet7

&A
Page &P

Sheet8

&A
Page &P

Sheet9

&A
Page &P

Sheet10

&A
Page &P

Sheet11

&A
Page &P

Sheet12

&A
Page &P

Sheet13

&A
Page &P

Sheet14

&A
Page &P

Sheet15

&A
Page &P

Sheet16

&A
Page &P

n = 8, x = −1.0, and s = 2.39

n=8, x=-1.0, and s=2.39

Before 93 106 87 92 102 95 88 110

After 92 102 89 92 101 96 88 105

Difference -1 -4 2 0 -1 1 0 -5

Before 9310687921029588110

After 9210289921019688105

Difference -1-420-110-5

2.39

1.02.3651.02

8

(1.0,3.0)

s

xt

n

±=-±=-±

-

Sheet1

Before 93 106 87 92 102 95 88 110
After 92 102 89 92 101 96 88 105
Difference -1 -4 2 0 -1 1 0 -5
&A
Page &P

Sheet2

&A
Page &P

Sheet3

&A
Page &P

Sheet4

&A
Page &P

Sheet5

&A
Page &P

Sheet6

&A
Page &P

Sheet7

&A
Page &P

Sheet8

&A
Page &P

Sheet9

&A
Page &P

Sheet10

&A
Page &P

Sheet11

&A
Page &P

Sheet12

&A
Page &P

Sheet13

&A
Page &P

Sheet14

&A
Page &P

Sheet15

&A
Page &P

Sheet16

&A
Page &P

1.00

1.18

2.39/8

s

x

t

sn

m

---

===-

Before9310687921029588110

After9210289921019688105

P-value difference0.09

Sheet1

Before 93 106 87 92 102 95 88 110
After 92 102 89 92 101 96 88 105
P-value difference 0.09
&A
Page &P

Sheet2

&A
Page &P

Sheet3

&A
Page &P

Sheet4

&A
Page &P

Sheet5

&A
Page &P

Sheet6

&A
Page &P

Sheet7

&A
Page &P

Sheet8

&A
Page &P

Sheet9

&A
Page &P

Sheet10

&A
Page &P

Sheet11

&A
Page &P

Sheet12

&A
Page &P

Sheet13

&A
Page &P

Sheet14

&A
Page &P

Sheet15

&A
Page &P

Sheet16

&A
Page &P