Está en la página 1de 6

Lecture 4a: Hypothesis Testing

Six Steps of Hypothesis Testing.


1. Decide on the hypothesis youre going to test.
o Ho, null hypothesis. This is the claim you are trying to prove.
o H1, alternative hypothesis. This is the counterclaim. This is the claim you will accept if the null
hypothesis turns out to be false.
Null Hypothesis, Ho
TRUE

Action
Accept Ho
Reject Ho

Null Hypothesis, Ho
FALSE
Type II Error

Type I Error

2. Choose your test statistic.


o Z-test, 30
o t-test, 30

(one-tailed test, one sample mean test)

1 2
2

(two-sample mean, two-tailed test)

1+ 2

1 2

1 2
[2 ( 1)]+[2
2 (2 1)]][ 1 + 1 ]
[ 1 1
[1 +2 ]2
1 2

(two-sample mean, two-tailed test)

where: = ; = ; = . ; =
NOTE: The equation for the one sample mean, one-tailed test is the same for both the
z- and t-tests.
3. Determine the critical region for your decision.
Use Table 1 (Textbook) or The Normal Curve Areas for the z-test. Use Table 2 if a level of
significance() is indicated.
Use Table 3 for the t-test.
4. Find the p-value of the test statistic.
A p-value is the probability of getting a value up to and including the one in your sample in the
direction of your critical region. Its a way of taking your sample and working out whether the
result falls within the critical region for your hypothesis test. In other words, we use the p-value
to say whether or not we can reject the null hypothesis.
5. See whether the sample result is within the critical region.
6. Make your decision.
In this scenario, you can now commit either a type I or type II error when you decide to accept
the null hypothesis or reject the null hypothesis.

Illustrative Sample
The strength of steel wire made by an existing process is normally distributed with a mean of 1250
and a standard deviation of 150. A batch of wire is made by a new process, and a random sample
consisting of 25 measurements gives an average strength of 1312. Assume that the standard deviation
does not change. Is there evidence at the 1% level of significance that the new process gives a larger
mean strength than the old?
1. Make the hypothesis.
Null Hypothesis, Ho: = 1250
Alternate Hypothesis, H1: >1250 (one-tailed test, larger mean strength than the old)
2. =

1250
150
25

, a larger value of z would make Ho implausible.

3. The critical value of z for a one-tailed test for 1% level of significance


corresponds to 1 F(z1) = 0.01, so F(z1) = 1 0.01 = 0.99.
4. With a p-value of 0.99, from Table 1: z = 2.3267
5. The critical value of x would be

1 = + ( ) = 1250 + 2.3267 (

150

25

) = 1319.8 1320 > 1312

6. Make a decision.
1312 is not within the rejection region, one can say that there is no significance at 1% to reject the
null hypothesis.
Exercise Problems
1. When a manufacturing process is operating properly, the mean length of a certain part is known
to be 6.175 inches, and lengths are normally distributed. The standard deviation of this length is
0.0080 inches. If a sample consisting of 6 items taken from current production has a mean length of
6.168 inches, is there evidence at the 5% level of significance that some adjustment of the process is
required?
2. A taxi company has been using Brand A tires, and the distribution of kilometers to wear-out has
been found to be approximately normal with = 114,000 and = 11,600. Now it tries 12 tires of Brand
B and finds a sample mean of x = 117,200. Test at the 5% level of significance to see whether there is
a significant difference (positive or negative) in kilometers to wear-out between Brand A and Brand
B. Assume the standard deviation is unchanged.

Tests Concerning Means

Non-Parametric Hypothesis Test


Non-parametric testing is used on qualitative data. Qualitative data refers to those information which
noted by the frequency of their occurrence.
o

Goodness-of-Fit Test (One variable Chi-square )


2 =

( )2

NOTES:
1. The chi-squared test for frequency distributions becomes more sensitive as the number of
degrees of freedom increases, and that increases as the number of classes increases.
2. If the calculated value of 2 is greater than the corresponding tabulated or computer value of 2,
the null hypothesis must be rejected at the level of significance equal to the stated upper-tail
probability. The chi-squared test for frequency distributions is always a one- tailed or one-sided
test.
3. Degrees of freedom, df
df = the number of classes or cells used in the comparison - the number of linearly independent
restrictions placed on those data
df = n - restriction
Illustrative Sample
A die was tossed 120 times with the observed frequencies shown below. Test whether the die shows
evidence of bias at the 5% level of significance.
Result
1
Observed frequency 12

2
25

3
28

4
14

5
6
15 26

Solution:
If there is no bias, all the results are equally likely.
H0: Pr [1] = Pr [2] = Pr [3] = Pr [4] =Pr [5] =Pr [6]
H1: Not all the results are equally likely.
The probability of each of the possible result is 1/6, the expected frequency of each result is 20 (120/6).

Number of
Tosses
1
2
3
4
5
6

( )

( )2

12
25
28
14
15
26

20
20
20
20
20
20
Total

-8
5
8
-6
-5
6

64
25
64
36
25
36

( )2

3.2
1.25
3.2
1.8
1.25
1.8
12.5

Degrees of Freedom, df = 6 (tosses) 1 (restriction)(the sum of the frequencies = total number of tosses) = 5

From Table 4 (textbook): df =5 and = 0.05; 2 = 11.0705

11.0705
12.5

Calculated value, 12.5 > Tabulated value, 11.0705; reject Ho.


Illustrative Sample: Goodness-of-Fit
The thickness of a particular metal part of an optical instrument was measured on 121 successive
items as they came off a production line under what was believed to be normal conditions. The results
are shown in Table 4.5.
Table 4.5: Thicknesses of Metal Parts, mm
3.40 3.21 3.26 3.37 3.40 3.35 3.40 3.48 3.30 3.38 3.27
3.35 3.28 3.39 3.44 3.29 3.38 3.38 3.40 3.38 3.44 3.29
3.37 3.41 3.45 3.44 3.35 3.35 3.46 3.31 3.33 3.47 3.33
3.37 3.31 3.51 3.36 3.32 3.33 3.43 3.39 3.39 3.28 3.33
3.25 3.28 3.30 3.41 3.39 3.33 3.27 3.34 3.33 3.42 3.35
3.34 3.32 3.42 3.31 3.38 3.44 3.37 3.35 3.57 3.41 3.28
3.49 3.26 3.44 3.46 3.32 3.36 3.41 3.39 3.38 3.26 3.37
3.28 3.35 3.36 3.34 3.42 3.38 3.39 3.51 3.44 3.39 3.36
3.35 3.42 3.34 3.36 3.42 3.38 3.46 3.34 3.37 3.39 3.42
3.37 3.33 3.39 3.30 3.35 3.38 3.38 3.27 3.31 3.32 3.45
3.49 3.45 3.38 3.41 3.35 3.39 3.24 3.35 3.34 3.37 3.37
Test the data for goodness of fit to a normal distribution at 5% level of significance. The mean and
standard deviation were estimated from the data to be x = 3.369 mm and s = 0.0629 mm.
Expected and Observed Class Frequencies
Class Boundary
(mm)
----- - 3.195
3.195 3.245
3.245 3.295
3.295 3.345
3.345 3.395
3.395 3.445
3.445 3.495
3.495 3.545
3.545 3.595
3.595 - -----

0
2
14
24
46
22
10
2
1
0

0.3
2.6
11.4
28.2
37.2
27.6
10.9
2.4
0.3
0.0

( )

( )2

( )2

16

14.3

1.7

2.89

0.2021

24
46
22

28.2
37.2
27.6

-4.2
8.8
-5.6

17.64
77.44
31.36

0.6255
2.0817
1.1362

13

13.6

-0.6

0.36

0.0265

Total

4.072

Cells must be combined in order for an expected frequency to be at least 5.


Make the Hypothesis.
Ho: probabilities for the various cells are given by the normal distribution
H1: other factors affect probabilities
Determine the degrees of freedom.
df = No. of Cells Restrictions (, ) = 5 1 2 = 2
Determine the critical region: Table 4: df = 2 and = 0.05 : 2 = 5.99146 ()
2
2

<
Accept the null hypothesis.

También podría gustarte