You are on page 1of 35

Interval Estimation Estimation of Proportion Test of Hypotheses Null Hypotheses and Tests of Hypotheses Hypotheses Concerning One mean

Hypotheses Concerning One Proportion

Interval Estimation
Large sample confidence interval for - known Large sample confidence interval for Small sample confidence interval for

x z / 2

< < x + z / 2

s s < < x + z / 2 x z / 2 n n

s s x t / 2 < < x + t / 2 n n

Interval Estimation (contd)


Example: To estimate the average time it takes to assemble a certain computer component, the industrial engineer at an electronic firm timed 40 technicians in the performance of this task, getting a mean of 12.73 minutes and a standard deviation 2.06 minutes.

(a) What can we say with 99% confidence about the maximum error if is used as a point estimate of the actual average time required to do this job? (b) Use the given data to construct a 98% confidence interval for the true average time it takes to assemble the computer component.

Interval Estimation (contd)


Solution: Given x = 12.73, s = 2.06 and n = 40 (a) x = 12.73 and (1 - ) = 0.99 = 0.01 Since sample is large (n = 40) The maximum error of estimation with 99% confidence is

E = z / 2

s s 2.06 = z0.005 = 2.575 = 0.839 n 40 n

(b) 98% confidence interval (i.e. = 0.02 ) is given by

s s < < x + z0.01 n n 2.06 2.06 12.73 2.33 < < 12.73 + 2.33 40 40 11.971 < < 13.489. x z0.01

Interval Estimation (contd)


Example: With reference to the previous example with what confidence we can assert that the sample mean does not differ from the true mean by more than 30 seconds. Solution: Given E = 30 seconds = 0.5 minute, s = 2.06, n = 40 and we have to get value of (1 - ).

E = z / 2

s n 40 z / 2 = E z / 2 = (0.5) = 1.54 2.06 n


(from Table 3)

F ( z / 2 ) = F (1.54) = 0.9382

= 1 0.9382 = 0.1236 1 = 0.8764

Thus, we have 87.64% confidence that the sample mean does not duffer from the true mean by more than 30 seconds.

Estimation of Proportion (contd)


When n is large, we can construct approximate confidence intervals for the binomial parameter p by using the normal approximation to the binomial distribution. Accordingly, we can assert with probability 1 - that the inequality
z / 2 < X np np(1 p ) < z / 2

will be satisfied. Solving this quadratic inequality for p we can obtain a corresponding set of approximate confidence limits for p in terms of the observed value of x but since the necessary calculations are complex, we shall make the further approximation of substituting x/n for p in np(1 p) .

Estimation of Proportion (contd)


Large sample confidence interval for p
x x x x 1 1 x n n n n < p < + z / 2 n n n

x z / 2 n

where the degree of confidence is (1 - )100%. Maximum error of estimate p(1 p) E = z / 2 n With the observed value x/n substituted for p we obtain an estimate of E.

Estimation of Proportion (contd)


Sample size determination
z n = p (1 p ) / 2 E
2

But this formula cannot be used as it stands unless we have some information about the possible size of p. If no much information is available, we can make use of the fact that p(1 - p) is at most 1/4, corresponding to p = 1/2 , as can be shown by the method of elementary calculus. If a range for p is known, the value closest to 1/2 should be used. 2 Sample size (p unknown) 1 z
n= 4 E
/2

Test of Hypotheses
There are many problems in which rather than estimating the value of parameter we are interested to know whether a statement concerning a parameter is true or false; that is, we test a hypothesis about a parameter. To illustrate the general concepts involved in deciding whether or not a statement about the population is true or false, suppose that a consumer protection agency wants to test a paint manufacturers claim that the average drying time of his new fast-drying paint is 20 minutes. It instructs a member of its research staff to take 36 boards and paint them with paint from 36 different 1-gallon cans of the paint, with intention of rejecting the claim if the mean drying times exceeds 20.75 minutes otherwise, it will accept the claim and in either case it will take whatever action is called for in its plans.

Test of Hypotheses (contd)


This provides a clear-cut criterion for accepting or rejecting the claim, but unfortunately it is not infallible. Since the decision is based on a sample, there is the possibility that the sample mean may exceeds 20.75 minutes even though the true mean drying time is = 20 minutes and there is also possibility that the sample mean may be 20.75 minutes or less even though the true mean drying time is, say, = 21 minutes. Thus before adopting the criterion, it would seem wise to investigate the chances that the criterion may lead to a wrong decision. Assuming that it is known from past experience that =2.4 minutes, let us first investigate the probability that the sample mean may exceeds 20.75 minutes even though the true mean drying time is = 20. Assuming the population is large enough to be treated as an infinite.

Test of Hypotheses (contd)


X 20.75 20 P ( X 20.75) = P / n 2.4 / 36 = P( Z 1.875) = 1 F (1.875) = 1 0.9696 = 0.0304
Hence the probability of erroneously reject the hypothesis = 20 minutes is approximately 0.0304.

0.0304

Figure: Probability of falsely rejecting claim

x Minutes 20.75 = 20 Accept the claim Reject the claim that = 20 that = 20

Test of Hypotheses (contd)


Consider the other possibility where the procedure fails to detect that > 20 minutes. Suppose that true mean drying time is = 21 minutes so calculate the probability of getting a sample mean less than or equal to 20.75 minutes and hence erroneously accepting the claim that = 20 minutes.

X 20.75 21 P ( X 20.75) = P / n 2.4 / 36 = P( Z 0.625) = F (0.625) = 0.2660


0.2660

Figure: Probability of failing to reject claim

20.75 = 21 Accept the claim Reject the claim that = 20 that = 20

x Minutes

Test of Hypotheses (contd)


The situation described in this example is typical of testing a statistical hypothesis and it may be summarized in the following table, where we refer to the hypothesis being used as hypothesis H: Accept H Correct decision Type II error Reject H Type I error Correct decision

H is true H is false

If hypothesis H is true and not rejected or false and rejected, the decision is in either case correct. If hypothesis H is true but rejected, it is rejected in error, and hypothesis H is false but not rejected, this is also an error.

Test of Hypotheses (contd)


The first of these errors is called a Type I error. The probability of committing it when the hypothesis is true, is designated by the Greek letter (alpha). The second error is called a Type II error and the probability of committing it is designated by the Greek letter (beta). Thus in the above example we showed that for the given test criterion = 0.03 and = 0.27 when = 21 minutes. In calculating the probability of a type II error in our example we arbitrarily chose the alternative value = 21 minutes. However, in this problem as in most others, there are infinitely many other alternatives, and for each one of them there is a positive probability of erroneously accepting the hypothesis H.

Null Hypotheses and Tests of Hypotheses


Null hypothesis: It is a hypothesis in which we hypothesize the opposite of what we hope to prove. For example, if we want to show that one method of teaching computer programming is more efficient than another, we hypothesize that two methods are equally effective. Since we hypothesize that there is no difference in the effectiveness of the two teaching methods, we call hypothesis like this null hypothesis and denote by H0.

Null Hypotheses and Tests of Hypotheses (contd)


Guideline for selecting the null hypothesis When the goal of an experiment is to establish an assertion, the negation of the assertion should be taken as the null hypothesis. The assertion becomes the alternative hypothesis. Notation for the hypotheses H1: The alternative hypothesis is the claim we wish to establish. H0: The null hypothesis is the negation of the claim

Null Hypotheses and Tests of Hypotheses (contd)


Example: A process for making steel pipe is under control if the diameter of the pipe has a mean of 3.0000 inches with a standard deviation of 0.0250 inch. To check whether the process is under control, a random sample of size n = 30 is taken each day and the null hypothesis = 3.0000 is rejected if X is less than 2.9960 or greater than 3.0040. Find (a) the probability of a Type I error; (b) the probability of a Type II error when = 3.0050 inches.

Null Hypotheses and Tests of Hypotheses (contd)


Solution: n = 30, = 3.0000, = 0.0250
( a ) = P ( Type I error) = P ( X < 2 .9960 or X > 3 .0040 ) = P ( X < 2 .9960 ) + P ( X > 3 .0040 ) X X 2 . 9960 3 . 0000 3 .0040 3 .0000 +P > =P < / n 0 .0250 / 30 0 .0250 / 30 / n = P (Z < 0 .876 ) + 1 P ( Z < 0 .876 ) since X

/ n

will be random variable with approximat ely

standard normal distributi on. = F ( 0 .876 ) + 1 F ( 0 .876 ) = 2 F ( 0 .876 ) = 0 .381

Null Hypotheses and Tests of Hypotheses (contd)


(b) = P(Type II error) = P(2.9960 < X < 3.0040) (when = 3.0050) 2.9960 3.0050 X 3.0040 3.0050 = P < < 0.0250 / 30 / 0 . 0250 / 30 n = P(1.97 < Z < .219)
since X

/ n

will be random variable with approximat ely

standard normal distributi on.

= F (.219) F (1.97)
= 0.4133 0.0244 = 0.3889

Null Hypotheses and Tests of Hypotheses (contd)


Example: Suppose that for a given population with = 8.4 in2 we want to test the null hypothesis = 80.0 in2 against the alternative hypothesis < 80.0 in2 on the basis of a random sample of size n = 100. (a) If the null hypothesis is rejected for X < 78.0 in2 and otherwise it is accepted, what is the probability of a Type I error? (b) What is the answer to part (a) if the null hypothesis is 80.0 in2 instead of = 80.0 in2 ?

Null Hypotheses and Tests of Hypotheses (contd)


Solution: Given = 8.4 n = 100, H0 : = 80, H1 : < 80 (a) = P (Type I error) = P ( X < 78)

X 78 80 = P < / n 8.4 / 100 = P ( Z < 2.38) (since n is large) = F (2.38) = 0.0087


(b) If null hypothesis is 80, then for this composite null hypothesis 0.0087 is maximum for all values of the null hypothesis which we get when = 80 hence probability of a Type I error will be at most 0.0087 i.e. 0.0087

Null Hypotheses and Tests of Hypotheses (contd)


The errors and their probabilities Type I error: Rejection of H0 when H0 is true. Type II error: Non-rejection of H0 when H1 is true. = probability of making a Type I error (also called the level of significance) = probability of making a Type II error Five steps of hypothesis testing: 1 We formulate a null hypothesis and an appropriate alternative hypothesis which we accept when the null hypothesis must be rejected.

Null Hypotheses and Tests of Hypotheses (contd)


2. We specify the probability of a type I error; if possible, desired or necessary we may also specify the probabilities of Type II errors for particular alternatives. 3. Based on the sampling distribution of an appropriate statistic, we construct a criterion for testing the null hypothesis against the given alternative. 4. We calculate from the data the value of the statistic on which the decision is to be based. 5. We decide whether to reject the null hypothesis or whether to fail to reject it.

Hypotheses Concerning One Mean


Statistic for test concerning mean known

X 0 Z= / n

If z is such that the area under the standard normal curve to its right equals , the critical regions, namely, the sets of values of Z for which we reject the null hypothesis = 0, can be expressed as it following table: Alternative hypothesis Critical Regions for Testing = 0 (Normal population and known) Reject null hypothesis if: Z < - z Z > z Z < - z/2 or Z > z/2

< 0 >0 0

Hypotheses Concerning One Mean (contd)


Example: According to the norms established for mechanical aptitude test, persons who are 18 years old should average 73.2 with a standard deviation of 8.6. If 45 randomly selected persons of that age averaged 76.7, test the null hypothesis = 73.2 against the alternative hypothesis > 73.2 at the 0.01 level of significance. Solution: Given 0 = 73.2 1. Null hypothesis H0: = 73.2 Alternative hypothesis H1: > 73.2 2. Level of significance: = 0.01 3. Criterion: Using a normal approximation for the distribution of the sample mean we reject the null hypothesis when Z > z = 2.33 where X 0 Z= . / n

Hypotheses Concerning One Mean (contd)


4 Calculations: Given 0 = 73.2, = 8.6, n = 45 and x = 76.7

Z=

76.7 73.2 8.6 / 45

= 2.73

5. Decision: Since Z = 2.73 > 2.33, the null hypothesis that = 73.2 is rejected at the 0.01 level of significance. ************************************************* If = 0.05, the dividing lines, or critical values, of the criteria are 1.645 and 1.645 for the one sided alternatives and -1.96 and 1.96 for the two sided alternative. If = 0.01, the dividing lines of the criterion are 2.33 and 2.33 for the one sided alternatives and 2.575 and 2.575 for the two sided alternative.

Hypotheses Concerning One Mean (contd)


Statistic for large sample test concerning mean unknown

X 0 Z= S/ n
Alternative hypothesis Critical Regions for Testing = 0 (large sample and unknown) Reject null hypothesis if: Z < - z Z > z Z < - z/2 or Z > z/2

< 0 >0 0

Hypotheses Concerning One Mean (contd)


Statistic for small sample test concerning mean normal population

X 0 t= S/ n

Alternative hypothesis
Critical Regions for Testing = 0 (Normal population and unknown) One sample t-test

< 0 >0 0

Reject null hypothesis if: t < - t t > t t < -t/2 or t > t/2

t and t/2 are based on n 1 degrees of freedom

Hypotheses Concerning One Mean (contd)


Example: Test run with 6 models of an experimental engine showed that they operated for 24, 28, 21, 23, 32 and 22 minutes with a gallon of a certain kind of fuel. If the probability of Type I error is to be at most 0.01, is this evidence against a hypothesis that on the average this kind of engine will operate for at least 29 minutes per gallon with this kind of fuel? Assume normality. Solution: Given n = 6, x1 = 24, x2 = 28, x3 = 21, x4 = 23, x5 = 32, x6 = 22.

x = 25 and s = 4.195

Hypotheses Concerning One Mean (contd)


1. 2. 3. Null hypothesis H0: 29 Alternative hypothesis H1: < 29 Level of significance: 0.01 Criterion: Since the probability of a Type I error is greatest when = 29 minutes, we proceed as if we were testing the null hypothesis = 29 minutes against the alternative hypothesis < 29 minutes at the 0.01 level of significance. Assuming the population is normal we can use the statistics X

t=

S/ n

Hypotheses Concerning One Mean (contd)


Since the alternative hypothesis is one sided the critical region (set of values of t for which we can reject null hypothesis) is defined by t < - t0.01 where t0.01 with 5 degree of freedom is 3.365. 4. Calculations: Given 0 = 29, s = 4.195, n = 6 and x = 25 25 29 t= = 2.336. 4.195 / 6 5. Decision: Because 2.336 > -3.365, we cannot reject the null hypothesis at the 0.01 level of significance.

Hypotheses Concerning One Proportion


Although there are exact tests based on the binomial distribution that can be performed with the use of Table 1, we shall consider here only approximate large sample tests based on the normal approximation to the binomial distribution. We shall test the null hypothesis p = p0 against one of the alternatives p < p0, p > p0 or p p0 with the use of the statistic X np0 Z= np0 (1 p0 ) which is a random variable having approximately the standard normal distribution.

Hypotheses Concerning One proportion (contd)


Critical Regions for Testing p = p0 (large sample) Alternative hypothesis p < p0 p > p0 p p0 Reject null hypothesis if: Z < - z Z > z Z < - z/2 or Z > z/2

Hypotheses Concerning One proportion (contd)


Example: The performance of a computer is observed over a period of 2 years to check the claim that the probability is 0.20 that its downtime will exceed 5 hours in any given week. Testing the null hypothesis p = 0.20 against the alternative hypothesis p 0.20, what can we conclude at the level of significance = 0.05, if there were only 11 weeks in which the downtime of the computer exceeded 5 hours? Solution: Given n = 2 years = 104 weeks, x = 11 weeks 1. Null hypothesis H0: p = 0.20 Alternative hypothesis H1: p 0.20 2. Level of significance: = 0.05

Hypotheses Concerning One proportion (contd)


3. Criterion: Using a normal approximation to the binomial distribution we reject the null hypothesis when Z < - z0.025 or Z > z0.025 where X np0 Z= np0 (1 p0 ) Since z0.025 = 1.96, the null hypothesis must be rejected if |Z| >1.96 i.e. Z < - 1.96 or Z > 1.96. 4. Calculation: p0 = 0.20, x = 11 and n = 104 11 104(.2) Z= = 2.40 104(.2)(.8) 5. Decision: Since observed value Z = -2.4 < -1.96, we reject the null hypothesis at the 5% level of significance. Evidence against the null hypothesis is strong.