This action might not be possible to undo. Are you sure you want to continue?

# College Of Science, Engineering & Technology School of Life and Physical Sciences

Foundation Studies General Mathematics B

Hypothesis Testing Notes

Hypothesis Testing

1 Hypotheses

(i) What is a Hypothesis? An hypothesis is an assumption, a statement made to explain a set of facts and to form a basis of further investigation. It is understood that the statement is subject to proof or checking. (ii) Examples of hypotheses, or statements, made are: 25% of all males over the age of 50 are divorced, the average length of time spent combing one's hair is 6 minutes/day, trains only run on time 5% a day, the average weekly income per family is $900 , females spend more time watching television than males.

All these hypotheses have one thing in common. The populations of interest are so large that for various reasons it would not be feasible to study all the items, or persons in the population. (iii) What is Statistical Testing? One of the major roles of statisticians in practice is to draw conclusions from a set of data. This process is known as statistical inference but it must always be borne in mind that, whatever conclusion is reached, it can always be wrong. However, in many circumstances we can put a probability on whether our conclusion is correct and so we can make a decision that we could say is 'beyond reasonable doubt'. This process is called statistical testing. Statistical testing begins with a hypothesis - an assumption about the value of a population parameter, (which is usually the mean). A sample is taken from the population, and the value of the sample mean is calculated. A decision then has to be made. If there is no significant difference between the values, the hypothesis may be accepted. However, if there is a difference, the hypothesis may be rejected. These decisions are made on the significance (or size) of the difference.

2

(iv)

In hypothesis testing, the hypothesis is not accepted or rejected with absolute certainty, but with a definite level of confidence that the error in the decision is small. Hypothesis testing starts with an assumed value of the population mean, and sampled data is collected to test the assumption made with a specified level of confidence.

(v)

Null Hypothesis The null hypothesis is the hypothesis that is to be tested. The null hypothesis is denoted by H0 . H - stands for hypothesis 0 - implies nothing has changed. H0 : µ = µ 0 suggests that the population mean µ , is as it claims to be, in other words, there is no difference between what is observed and what is claimed. Generally speaking, the null hypothesis is set up for the purpose of either rejecting or accepting it. Alternatively, it is a statement that will be accepted if the sample data fails to provide us with convincing evidence that it is false.

(vi)

Alternative Hypothesis The alternative hypothesis describes what you would believe by rejecting the null hypothesis. It is denoted H1 , and read as 'H one'. The alternative hypothesis (H1) will be accepted if the sample data provide us with evidence that the null hypothesis (H0) should be rejected. The alternative hypothesis (H1) is the statement that will be accepted if the data from the sample provide us with enough evidence that the null hypothesis should be rejected (ie H0 is false).

(vii)

Classification of Hypotheses The specific wording of a hypothesis for a question should always be expressed in terms of the data for that question. For example, consider the following question: Is the population mean µ equal to a specified value?

3

Another way of expressing the null and alternative hypotheses is in the form of symbols. 4 . the true value of µ can be less than µ 0 . In this case: H0 : µ = µ H1 : µ > µ 0 0 . The alternative hypothesis is then written as: H1 : µ ≠ µ 0 (ix) One-tailed Test A one-tailed test assumes that there is a stronger conviction about the true value of µ . the true value of µ can either be above or below the hypothesized value of µ 0 . this takes the form in the null hypothesis of the population mean µ taking on a specified value µ 0 .Hypotheses: H0 : The population mean µ is equal to the specified value. the alternative hypothesis is the complement of the null hypothesis. H1 : The population mean µ is not equal to the specified value. That is. In the case where we have only a single sample. That is. or . the true value of µ can be greater than µ 0 . That is: H0 : µ = µ 0 (viii) Two-tailed Test In every case. A two-tailed test assumes no preconceived notions about the true value of µ . v.

The level of significance is designated by α (the Greek letter alpha). a 5% significance level. for example. Although in theory any significance level may be used. we will reject H0 . The level of significance is the risk we assume if rejecting the null hypothesis (H0) when it is actually true. as being false if the probability of obtaining a sample like ours is less than 0.In this case: H0 : µ = µ H1 : µ < µ 0 0 (x) Significance Levels The null hypothesis is rejected if the probability of obtaining a result is unlikely as the one which was obtained is small.01 (or the 1% significance level). we will reject H0 as being false if the probability of obtaining a sample like ours is less than 0. It is necessary to choose a probability and agree that probabilities below this are 'unlikely'. 5 . Another widely used level is α = 0.05 .05 and accept H0 as being true if this probability is more than 0. If we use. say. If we use.01 . The value which is chosen is called the significance level and it measures the probability of rejecting the null hypothesis when it is true.05 . It is also known as the level of risk.01 and accept H0 as being true if this probability is more than 0. a 1% significance level then we are saying that an event (or sample) that occurs less than 1% of the time is considered unusual. In this case. How small? This is a question to which the answer is arbitrary and depends to some extent on the use that is to be made of the investigation. what we are saying in effect is that an event (or sample) that occurs less than 5% of the time is considered unusual. The most common significance level used is 0. In this case. these two are by far the most popular.05 (often called the 5% significance level) which is commonly written as α = 0. This may be a more appropriate term because it is the risk taken if you reject the null hypothesis when it is really true.

The probability of making a type I error is the significance level of the test. (xiii) Type II Error This error occurs when you accept H0 as being true when H0 is really false. Unfortunately. A type I error occurs if the null hypothesis (H0) is rejected when it is actually true. Of course we would like to avoid both errors as much as possible. in trying to avoid one of them we increase the chance of making the other one. (xiv) Summary The table below. In effect there are two possible errors that can be made when making a conclusion about a null hypothesis. The probability of making a type II error is denoted by the Greek letter β (beta). A type I error is designated by the Greek letter α . a statistician must be aware of the consequences of drawing the wrong conclusion.(xi) Errors In performing a hypothesis test. (table 1). These consequences assist in deciding which significance level to use. These are: (xii) Type I Error This error occurs when you reject H0 as being false when H0 is really true. summarises the relationship between rejecting/accepting H0 and whether or not H0 is true is shown below in terms of type I and type II errors: 6 . A type II error occurs if we accept the null hypothesis (H0) when it is actually false.

(b) If a jury finds an innocent verdict. Example 2 A company has developed a drug which it feels may be a cure for certain types of cancer. (a) A type I error occurs when we reject H0 . of a murder case for example. we must test the hypothesis: H0 : the defendant is innocent H1 : the defendant is guilty It is up to the prosecutor to show reasonable evidence to convict. when H0 is true. It has collected vast amounts of data as a result of clinical trials and has asked you whether the drug actually works. in other words a jury convicts an innocent person. when H0 is false. A type II error occurs when we accept H0 . this means that there are not sufficient evidence to show his guilt.decision reject H0 accept H0 H0 true type I error no error made table 1 H0 false no error made type II error Example 1 In a courtroom. in other words the jury finds a guilty person innocent. The null and alternative hypotheses (in words) are: H0 : the drug does not work H1 : the drug does work 7 .

(n > 25) . If we want to avoid a type I error then a small value of α should be chosen.(a) A type I error occurs when it is concluded that the drug works when in fact it doesn't. then: the size (n) of the sample. the standard deviation (s) of the sample. (b) A type II error occurs when it is concluded that the drug does not work when in fact it does work. 8 . 2 z-test Statistic (i) What is a Test Statistic? A test statistic is a value. We will deal with the case of a single sample being chosen from a population and the question of whether that particular sample might be consistent with the rest of the population. σ . it will be assumed that the following information will always be available: 1 2 3 (ii) z-test statistic A z-test statistic is used when the size of the sample is more than 25 . In calculating the value of a test statistic. used to accept or reject the null hypothesis: H0 : µ = µ 0 . determined from sample information. However.01 . is known. say α = 0. it is very important that the correct one is used since the use of an incorrect test statistic can lead to an incorrect conclusion. (a) If the standard deviation of the population. Exactly which test statistic is appropriate depends on the information available. the mean ( x ) of the sample.

z= x − µ0 σ n (b) If the value of σ is unknown. and the significance level used.05) 9 . A critical value for a z-test statistic is denoted by zc . The critical value (zc) is the dividing point between the region where the null hypothesis is rejected or not rejected. σ n is referred to as the standard error of the 3 The Critical Value (i) The critical value is the value of the test statistic which is significant. ( α = 0.01 or α = 0. then: z= x − µ0 s n (iii) Standard Error The expression mean. By significant we mean the value that leads to the rejection of the null hypothesis. (ii) The particular critical value to use depends on two things: 1 2 whether we are using a one-tailed or two-tailed test. the standard deviation is approximated by the sample deviation s .

01 The critical value zc = 2.96 are obtained by considering the z-score when 95% of the region under a normal curve is acceptable.025) region of acceptance (0. (figure 2): region of rejection (0.96 z scale figure 1 (iv) Case 2: Two-tailed Test with α = 0.05 = 0.There are four cases: case 1: two-tailed test with case 2: two-tailed test with case 3: one-tailed test with case 4: one-tailed test with (iii) α α α α = 0.96 and -1.005) 0 -2.58 are obtained by considering the z-score when 99% of the region under a normal curve is acceptable.96 0 1.025) -1.01 Case 1: Two-tailed Test with α = 0.05 = 0.05 H0 : µ = µ H1: µ ≠ µ 0 0 α = 0.95) region of rejection (0.58 2.01 H0 : µ = µ H1: µ ≠ µ 0 0 α = 0.58 z scale figure 2 10 . (figure 1): region of rejection (0.01 = 0.99) region of rejection (0.58 and -2.005) region of acceptance (0.05 The critical value zc = 1.

(figure 3): (a) region of rejection (0.(v) Case 3: One-tailed Test with α = 0.95) .05 (a) H0 : µ = µ H1: µ < µ 0 0 (b) or with α = 0.645 0 z scale (b) acceptance region of (0.01 11 .1.05) region of acceptance (0.05 H0 : µ = µ H1: µ > µ 0 0 The critical values are zc = . These values are obtained by considering the z-score when 95% of the region under a normal curve is acceptable.01 (a) H0 : µ = µ H1: µ < µ 0 0 (b) or H0 : µ = µ H1: µ > µ 0 0 with α = 0.05) 0 1.1.645 z scale figure 3 (vi) Case 4: One-tailed Test with α = 0.645 for (a) or zc = 1.645 for (b) .95) region of rejection (0.

05 α = 0. The latest sample of 100 workers revealed a sample mean x of 152.33 for (b) .33 for (a) or zc = 2.The critical values are zc = -2. young employees have been hired and new training and production methods have commenced. Test the hypotheses that the mean of 150 is still correct at: (a) (b) α = 0. These values are obtained by considering the z-score when 99% of the region under a normal curve is acceptable.01 12 . Recently. The arithmetic mean ( µ ) of the workers is 150 .7 .33 zc figure 4 Example 3 The efficiency ratings of BHP steelworkers at the Newcastle plant have been studied over a period of many years and found to be normally distributed. and the standard deviation ( σ ) is 12 .01) -2.01) z scale 0 2. however.33 zc 0 z scale (b) region of rejection (0. (figure 4): (a) region of rejection (0.

96 (zc) z scale test statistic 2. it does not state whether the mean is greater than or less than 150 .25 13 .Solution (a) H 0 : µ = 150 H1 : µ ≠ 150 α = 0.96 .025) -1. (case 1).96 (zc) 0 1.96 < zc < 1. Since 2.25. this is a two-tailed test because the alternative hypothesis does not give a direction of the difference.25 lies outside the region between –1. That is.7 − 150 z= 12 100 = 2.025) region of rejection (0.25 From the sample of 100 workers.05 Note. x = 152. region of rejection (0.7 sample mean sample size n = 100 population standard deviation σ = 12 µ 0 = 150 population mean Because we know the population standard deviation ( σ ) we use the following z-test statistic formula: z= x − µ0 σ n which gives: 152. the z-test statistic z = 2. ∴ H 0 is rejected.

H0 is not rejected. The only way to prove beyond doubt that it is 150 is to check every efficiency rating in the population .7 and 150 can be attributed to the variation due to sampling (chance).25 is within the region between -2.that is. we did not prove beyond doubt that H0 is true. As seen in this example the decision on the null hypothesis changed when the level of significance changed. 14 . We did not reject the null hypothesis that the population mean efficiency rating is 150 . However. which is really a census. We can conclude that the population mean is not different from 150 .25 (as before) Since 2. based on sample evidence. It is important to select the significant level before setting up the hypothesis and sampling the population. to take a 100 percent sample.58 (the critical values) then the null hypothesis would be rejected in favour of the alternative hypothesis.58 0 z = 2.58 (case 2) which is the region of acceptance.(b) H 0 : µ = 150 H1 : µ ≠ 150 α = 0. We therefore conclude that based on the sample data we do not reject the null hypothesis.25 2. The difference between 152.58 or greater than +2. accept H0 reject H0 -2.58 and +2. another thing to remember is that as the level of significance changes so to has the outcome changed. Also. We therefore assume that the null hypothesis is true.01 The z-test statistic z = 2.58 reject H0 z scale It should be noted that if the z-test statistic for our example had produced a value that was less than –2.

we use the following z-test statistic formula: xμ − s n z= 0 $1017. this is the sample standard deviation) Because the sample standard deviation (s) is known only. The finance manager of credit services wants to find out if the mean monthly unpaid balance is still at $1000 as it was six months ago.05 This is a one-tailed test x = 1017.Example 4 The Myer Department Store issues its own credit card (Myercard). A random check of 172 unpaid balances revealed the sample mean to be $1017.05 α = 0.645 (case 3(b)). Should this finance manager conclude that the mean unpaid balance on Myercards is greater than $1000 . or is it reasonable to assume that the difference of $17.50 and the standard deviation of the sample $95 .416 $7.$1000 = $17.01 Solution (a) H 0 : µ = $1000 H1 : µ > $1000 α = 0.05 level has a critical value zc = 1.5 s = 95 n = 172 µ 0 = 1000 (Note.50 ($1017.50) is due to coincidence (or chance)? Test the hypothesis that the mean unpaid balance is not different from the usual amount at: (a) (b) α = 0.2437 A one tailed test at the α = 0.50 . 15 .50 = 2.5 − $1000 which gives z= $95 172 = $17.

416 (as before) A one tailed test at the α = 0.region of rejection (0. To check the accuracy of this statement.645 critical value 2. As before this z-test statistic lies in the region of rejection for the null hypothesis ie z > zc. Example 5 Cereal packets are meant to contain 500 gm of cereal. 100 packets were randomly selected and showed a mean of 497 gm with a standard deviation of 20 gm.01 level has a critical value zc = 2. (i. 16 .33 (case 4(b)). Is the manufacturer under filling the packets? Perform a hypothesis test at the 5% level. it is greater than the critical value (zc) of 1.42 test statistic As the test statistic (z) of 2. The alternate hypothesis H1 is accepted.01 The z-test statistic = 2. then the null hypothesis (H0) is rejected or the alternate hypothesis (H1) is accepted.42 lies in the region of rejection for the null hypothesis.e.645 . Therefore the decision is: The mean unpaid balance on Myercard is greater than the usual amount of $1000 .05) z scale 0 1. H 0 : µ = $1000 H1 : µ > $1000 (b) α = 0.

17 .645 (case 3(a)).05 has a critical value zc = -1.645 zc -1. It found that the distribution of times was skewed to the right with a mean of 21. region of rejection (0. Are these employees different to other employees in their travel time? Test at significance level of α = 0.6 minutes and a standard deviation of 7.2 minutes.5 test statistic 0 z scale Example 6 The personnel department of a company has been surveying employees and asking them how long it takes for them to travel from home to work each morning.05) -1.05 .1 minutes to travel to work.5 A one-tailed test at α = 0. A random sample of 25 employees in the accounts section took an average of 24.Solution H 0 : µ = 500 H1 : µ < 500 x = 497 s = 20 µ 0 = 500 n = 100 z-test statistic z= 497 − 500 20 100 = − 1. We accept the null hypothesis as the z-test statistics lies in the region of acceptance.

1 − 21.30 with a standard deviation of $2. To test the driver’s claim.5 n = 30 µ 0 = 12 18 .74 lies within the region –1.2 25 = = 1. Example 7 A taxi driver claims to make an average of $12.00 on each fare.6 7.00 H1 : µ > 12.2 n = 25 µ 0 = 21.6 ∴ z-test statistic z= x − µ0 σ n 24.6 x = 24.96 < zc < 1.74 Since z = 1. but the Taxation Office believes that the average is higher than that.6 H1 : µ ≠ 21.30 s = 2.01 Solution H 0 : µ = 12. the Taxation Office makes a random sample of 30 fares.Solution H 0 : µ = 21.00 x = 13.96 (case 1).50 .1 σ = 7. The amounts that the taxi driver made on the fares in the sample had a mean of $13. Test the driver’s claim at α = 0. H0 is accepted.

85 lies in the region of rejection. H0 is rejected at α = 0.33 (case 4(b)). Since the z-test statistic z = 2. or the t distribution. is used as the test statistic. who published his finding in 1908 using the pen name ‘Student’. 19 . Exercise 1(a) 4 t-test Statistic (i) A small sample is one of less than 25 observations.50 30 = 2.01 .30 − 12. The characteristics of student’s t distribution were developed by William S Gossett.85 A one-tailed test at α = 0. as it is usually called. He was especially worried about the discrepancy between s and σ when s was calculated from a very small sample. The student t .00 2. a brewmaster for the Guinness Brewery in Ireland.01 has a critical value zc = 2.z= x − µ0 s n = 13. If the population standard deviation ( σ ) unknown then the z distribution is not the appropriate test statistic. more ‘spread out’. than the normal z distribution) gave better or more correct results for small samples from a population which displayed a normal distribution. We therefore do not believe the taxi driver’s claim and conclude that there is evidence that the taxi driver makes an average of more than $12. Gossett was concerned with the behaviour of the z – statistic formula: x −µ z= s n when s had to be used as an estimator of σ . He proved that his t distribution (which is flatter.00 on each fare.

(ii) Then we can use a t-test statistic defined as: xμ − s n t= 0 (iii) Unlike the z-test statistic. the following need to be ascertained: 1 2 the level of significance: α the number of degrees of freedom: ν 3 What type of tailed test is in question: one-tailed or twotailed? (v) To find tc look down the left-hand side of the row with the appropriate degrees of freedom. This is because there is more variability in sample means computed from small samples. 20 . the t-test statistic has associated with it a quantity called degrees of freedom. v=n-1 (iv) Critical Value for t-test The critical value in any t-distribution. is found in the student-t distribution tables. and across the top for the appropriate test (either one-tailed or two-tailed) and the significance level used. tc . therefore we have less confidence in the resulting estimates and are less likely to reject the null hypothesis. In this case the degrees of freedom are denoted by the Greek letter v and are defined by v = n -1.The important to remember that the critical value for a given level of significance is greater for small samples than for larger samples. To use these tables.

however as this is a one-tailed test. The inequality in the alternative hypothesis points to the region of rejection in the left tail of the distribution. This cost when compared with that claimed by other insurance firms. and the standard deviation.01 t-test statistic t= 66 − 70 10 22 = −1. “less than” situation. respectively.518 21 . In order to evaluate the impact of these new measures a sample of 22 recent claims was chosen at random and costs were recorded.Example 8 The General Insurance Company over a period of years has established that it costs $70 on average to process the paperwork. It was found that the sample mean. tc = -2. ( x ) . As a result.518 . or can the difference of $4 ($66-$70) be attributed to chance? Solution H 0 : µ = 70 H1 : µ < 70 The test is one-tailed because there is interest only in whether or not there has been a reduction in cost.01 level of significance is there a reduction in the average cost. is said to be much more expensive.876 tc -critical value One-tailed test α = 0. cost-cutting measures were instituted. of the sample were $66 and $10 . pay the assessor and finalise the claim. At the α = 0. x = 66 s = 10 n = 22 µ 0 = 70 v = 21 α = 0.01 v = 21 (degrees of freedom) Using the t-distribution tables: tc = 2. s .

region of rejection (0.01)

-2.52 (tc)

0 -1.876 test statistic

t scale

As the t-test statistic lies in the region of acceptance, we accept the null hypothesis. Therefore, the cost cutting measures have not reduced the mean cost per claim to less than $70 based on the samples results. Example 9 Experience has shown that the number of matches in boxes follows a normal distribution. A manufacturer claims that the average number of matches in its boxes is 50 . A customer purchases a random sample of 9 boxes and counts the contents of each box. They were: 49 50 51 46 48 45 52 47 48

Based on this sample, should the customer believe the manufacturers claim? Use a two-sided test at α = 0.05 . Solution H 0 : µ = 50 H1 : µ ≠ 50 x = 48.4 s = 2.298 n=9 µ 0 = 50 v =8 α = 0.05

22

t-test statistic t= x − µ0

s n

=

48.44 − 50

2.298 9

= −2.09 tc - critical value Using the t-distribution tables; with

**α = 0.05 v=8 (degrees of freedom) two-tailed test tc = 2.306
**

Since t = -2.036 lies in the acceptable region, ie we accept H0 at α = 0.05 level of significance. The claim made by the company that there is an average of 50 metres in its boxes may well be true. Example 10 In a random sample of 20 components taken from a production line, the mean length of each component in this sample is 108.6 millimetres with a standard deviation of 6.3 millimetres. Given that each component should measure 105 millimetres long and that the population has proved to be normal, is there enough statistical evidence to show that the production line is producing components that are of an incorrect length? Test at the 5 percent level of significance. Solution H 0 : µ = 105 H1 : µ ≠ 105 x = 108.6 s = 6.3 n = 20 v = 19

µ 0 = 105 α = 0.05

23

**t-test statistic t= 108.6 − 105
**

6.3 20

= 2.556

This is a two-tailed test at a level of significance of α = 0.05 , with 19 degrees of freedom. tc - critical value Using the t-distribution tables: tc = 2.09

region of rejection (0.025)

region of rejection (0.025)

2.09

0

2.09

z scale 2.556 test statistic

As the t-test statistic lies in the region of rejection, we reject the null hypothesis. The components produced on the production line are of a different length to normal. (vi) Summary of Steps in One Sample Hypothesis Testing (a) Write down the null hypothesis H0 , and choose an appropriate form for the alternative hypothesis H1 , either not equal to µ ≠ µ 0 (a two tailed test) or a one tailed test either upper tail µ > µ 0 or lower tail µ < µ 0 . Use the appropriate test statistic to calculate the value of z or t . (c) the Use a decision rule (at the level of significance) to test for value of the test statistic.

(b)

24

A mathematics teacher may wish to know whether students taught with the aid of a computer have significantly higher grades than those taught with traditional methods. However. What it does do is provide us with a guide for making reasonable conclusions based on the evidence before us. It should be emphasised that statistics is not an exact science – it doesn’t prove anything. So far we have only considered one-sample tests. the chance always remains that our conclusions may be incorrect! Exercise 1(b) 5 Two sample Hypothesis Testing (i) Another important use of statistical testing is to see whether there is a significant difference between the means of samples from two populations. the general principles apply to all hypothesis testing in statistics for problems involving larger numbers of samples and other instances where a conclusion is to be drawn from data collected. The symbols used to describe aspects of each sample is shown in the table below. (table 2) Note. However.(d) Compare the calculated z or t value and compared it with the critical z or t value and decide from the decision to either accept or reject the null hypothesis. the two samples are drawn independently from the population: sample size mean standard deviation table 2 1 n1 (ii) symbol 2 n2 x1 s1 x2 s2 (iii) We wish to examine the difference between the means of the two samples: xd = x1 − x2 25 . and even provide us with the probability that we have made an error.

how can we decide whether or not the difference between the two means is significant? The standard procedure is to test the validity of the null hypothesis.Generally speaking. then the observed difference between the two sample means is not significant and is attributed to chance or random sampling fluctuations. is known. On the basis of the evidence produced by the two samples. n2 ≥ 25) and the population standard deviation. the appropriate statistic test needs to be used. First. there is the null hypothesis that the two populations from which the two samples originate have the same mean ( µ1 = µ2 ) . the standard error σ d . which states that µ1 = µ 2 . The alternative hypothesis to be explored is that the two samples are drawn from populations which have different means. If this is the case. we will either accept or reject the null hypothesis. Standard Deviation: σ known When two samples are large. the observed difference is not significant whenever the null hypothesis is accepted. This requires the z-statistic test. depending on the sample size. We will consider the situation when the sample size is large ( n ≥ 25 ) . utilizing the information from the two samples. the observed difference between the two sample means is significant. we have two hypotheses to explore. When two sample means are different. Symbolically we write: Two Tailed Test H 0 : µ1 = µ 2 H1 : µ1 ≠ µ 2 One Tailed Test H 0 : µ1 = µ 2 H1 : µ1 > µ2 or µ1 < µ 2 Having established the appropriate null and alternative hypotheses. of xd = x1 − x2 is given by the expression: (iv) (v) σd = σ 1 n1 + 1 n2 26 . ( n1 . when two sample means are different. If the null hypothesis is rejected. However. σ . the observed differences between the two sample means is deemed significant. (where d indicated “difference”). If this hypothesis is true.

is not known. ( n1 . sd .Note: the population standard deviation for a single sample is given by: σ n (vi) Standard Deviation: σ is not known When two samples are large. we replace: x s n for for for xd = x1 − x2 sd = s12 s2 2 + n1 n2 µ0 µ d = µ1 − µ 2 z= xμ − d sd d which gives: 27 . of xd = x1 − x2 is given by the expression: sd = s12 s2 2 + n1 n2 (vii) The z-statistic used for one sample hypothesis testing was given by: xμ − s n z= 0 When calculating the z-statistic for two sample hypothesis testing. σ . the standard error. n2 ≥ 25) and the population standard deviation.

5 Now ∴ z-test statistic: z= z = −2 ∴ Now zc = −2.Example 11 To compare the average life of two brands of 9-volt batteries.5 n1 n2 100 100 z= xd − µ d sd −1 − 0 0.e H 0 : µ1 = µ2 ) s12 s2 2 42 32 + = + = 0.58 (case 2) at α = 0. A mean life of 48 hours and a standard deviation of 3 hours are recorded for the sample from the second brand. Is the observed difference between the means of the two samples significant at the 0. a sample of 100 batteries from each brand is tested. 28 . the difference between the means of the two samples is not significant at the α = 0.01 ∴ we accept the null hypothesis That is. The sample selected from the first brand shows an average life of 47 hours and a standard deviation of 4 hours.01 level.01 level? Solution There are two hypotheses: H 0 : µ1 = µ 2 H 0 : μ1 ≠ μ2 n1 = 100 x1 = 47 s1 = 4 n2 = 100 x2 = 48 s2 = 3 and xd = x1 − x2 = 47 − 48 = −1 sd = µd = 0 ( i.

Example 12 The efficiency of two training centers in a large company is to be evaluated.5 hours of relief.01 level of significance? Solution H 0 : μ1 = μ2 H1 : µ1 ≠ µ 2 xd = x1 − x2 = 82. There is a significant difference at α = 0.5 7. z = ∴ z-test statistic: z = Now zc = 2.5 − 77 = 5. The first drug was tested on a group of 90 arthritis victims and produced an average of 8. The second drug was tested on 80 arthritis victims. producing an average of 7.5 − 0 = 3. Example 13 Two research laboratories have independently produced drugs that provide relief to arthritis sufferers.763 50 40 µd = 0 . with a standard deviation of 1.575 ∴ we reject the null hypothesis.9 hours of relief.5 sd = s12 s22 + = n1 n2 xd − µ d sd 5. The test results of a group of students from each training centre is given below: sample size mean standard deviation centre I 50 82.12 + = 1.763 7.22 9. with a 29 .1 Determine whether there is a significant difference between the centres at the α = 0.8 hours.2 centre II 40 77 9.01 .12 1.

Exercise 2(a) 30 .05 ) (case 3) We therefore reject H0 .9 = 0.6 − 0 = 1.1 n2 = 80 second drug This is a one-tailed test.98 0.6 and µ d = 0 sd = s12 s2 2 1.302 xd − µ d sd z= Now zc = 1.5 − 7. The second drug does provide significantly shorter relief. does the second drug provide a significantly shorter period of relief? Solution H 0 : µ1 = µ 2 H1 : µ1 > µ 2 where x1 = 8.645 (one tailed test at α = 0.82 2.standard deviation of 2.05 level of significance.5 s1 = 1.8 n1 = 90 first drug x2 = 7. xd = x1 − x2 = 8.302 Now z-test statistic = 0.12 + = + n1 n2 90 80 sd = 0. At the .9 s2 = 2.1 hours.

sd of xd = x1 − x2 is given by the expression: sd = 2 ( n1 − 1) s12 + ( n2 − 1) s2 ( n1 + n2 − 2) 1 1 + n1 n2 (ii) Degrees of Freedom With a t-test . the degrees of freedom.6 t-test Statistic – two samples (i) Standard Deviation: σ unknown When two samples are small. (n1. is given by: v = n1 + n2 − 2 (iii) The t-statistic used for one sample hypothesis testing was given by: t= xμ − s n 0 When calculating the t-statistic for two sample hypothesis testing. n2 < 25) the sample standard deviation. v . we replace: x for xd = x1 − x2 s for sd = n ( n1 − 1) s12 + ( n2 − 1) s2 2 n1 + n2 − 2 1 1 + n1 n2 µ 0 for µ d = µ1 − µ 2 31 .

79 also µ d = 0 ( i.which gives: t= xμ − d sd d Example 14 A building security wishes to determine if there is a significant difference between the activity in the cheque account of two of its branches.e H 0 : µ1 = µ 2 ) t–test statistic t= xd − µ d sd 32 . The following data was obtained: sample size mean standard deviation branch I 12 $1000 $150 branch II 10 $900 $120 Is there a significance difference between the two branches at the 5% level? Solution H 0 : µ1 = µ 2 H1 : µ1 ≠ µ2 sd = (two-tailed test) ( n1 − 1) s12 + ( n2 − 1) s2 2 n1 + n2 − 2 1 1 + n1 n2 1 1 + 12 10 xd = 1000 − 900 = 100 = (12 − 1)1502 + (10 − 1)1202 12 + 10 − 2 = 58.

we compute the observed value of t as: sd = ( n1 − 1) s12 + ( n2 − 1) s22 ( n1 + n2 − 2 ) 2 1 1 + n1 n2 2 sd = ( 12 − 1) ( 8 ) + ( 10 − 1) ( 10 ) ( 12 + 10 − 2 ) 1 1 + 12 10 = 3. There is no significant difference between the branches at the 5% level.70 58.05 level? Solution H 0 : µ1 = µ2 H1 : µ1 ≠ µ 2 Level of significance = 0 . tc = 2.086 ∴ we accept the null hypothesis.gives: t = 100 − 0 = 1.05 two-tailed test with v = 12 + 10 − 2 = 20 degrees of freedom. The results of the test are: Anglo-American Mexican-American x1 = 74 s1 = 8 x2 = 70 s2 = 10 Is the difference between the mean of the two groups significant at the 0.79 Now tc at α = 0. Example 15 A reading test is given to an elementary school class that consists of 12 Anglo-American children and 10 Mexican-American children.05 To test the null hypothesis.83 33 .

1 s2 = 4. with a standard deviation of 3.2 s1 = 3. At α = 0.043 3.01 xd = x1 − x2 = −4.83 t= With v = 20 degrees of freedom (v = 12 + 10 .05 level.9 sd = ( n1 − 1) s12 + ( n2 − 1) s2 2 ( n1 + n2 − 2 ) 1 1 + n1 n2 34 . The nine brand B cars that were tested averaged 32. The difference between the mean is not significant at the 0.01 should it conclude that brand B cars have higher average gas mileage than do brand A cars? Solution H 0 : µ1 = µ2 H1 : µ1 < µ 2 n1 = 12 x1 = 27.2) at α = 0.8 mpg .3 (one tailed) α = 0.8 n2 = 9 x2 = 32. with a standard deviation of 4.1 mpg .xd = 74 − 70 = 4 t-test statistic t= xd − µ d sd 4 = 1.2 miles per gallon.3 mpg. the average gas mileage for twelve cars of brand A was 27. Example 16 A consumer-research organization routinely selects several car models each year and evaluates their fuel efficiency. In this year’s study of two similar subcompact models from two different automakers. the t-critical value tc : tc = 2.05 level.086 (two tailed test) ∴ we accept the null hypothesis.

77 µd = 0 35 .sd = 1.

539 ∴ reject H0 : Brand B does have a significantly higher average gas mileage than Brand A at the 1% level of significance. Exercise 2(b) 36 .77 t = −2.t-test statistic t= xd − µ d −4.f One tailed test at α = 0.9 − 0 = sd 1.01 tc = -2.76 t–critical value ν = 12 + 9 − 2 = 19 d.

(iii) Sample proportions The sample proportion ( p) represents the probability of a success of a given sample. µp = p The standard deviation of a sample proportion σ p is also referred to as the standard error of the mean proportion and is given by: σp = pq n 37 . In this section we are going to discuss hypothesis testing of proportions. In each case we have dealt with large samples (z statistic) and small samples (t statistic). μ p . We will use this normal approximation to the binomial when dealing with the hypothesis testing of proportions. It can be shown that as a sample size increases. equals the population proportion. since the data is discrete. the binomial distribution approaches the normal in its characteristics. The sample proportion in the best estimate when the population proportion ( p) is not known.7 Hypothesis Testing of Proportions (i) So far we have discussed hypothesis testing involving the mean (one sample test) of a sample. not continuous. or two means (two sample test) of different samples. that is. proportion of occurrences in a population. (iv) Mean and Standard Deviation The mean or expected proportion of a sample. (ii) Normal Approximation to the Binomial Distribution When dealing with proportions the binomial distribution is the theoretically correct distribution to use.

After interviewing a random sample of 150 employees. training and experience qualify them for promotion. The company estimates that 80% of their employees are promotable. the null hypothesis is that the expected proportion equals the population proportion. (vi) z-test statistic To test whether the null hypothesis is accepted or rejected we determine the z statistic and test this value against the critical value (zc) at a given level of significance. The z-statistic when dealing with proportions is given by: z= p− p σp p p σp = sample proportion = population proportion = standard error Example 17 Consider a company that is evaluating the promotability of its employees. 38 . H0 : µ p = p H1 : µ p ≠ p alternatively. The company wishes to test the hypothesis that 80% of their workforce are promotable at a 5% level of significance. that is. determining the proportion of them whose ability. a committee finds that only 70% of the sample deserve promotion.Note: q=1-p n = number of independent binomial trials (v) Hypotheses When dealing with testing a single proportion.

The standard error: σp = z= 0.05 Note also that p = 0.96 (zc) z scale 39 .8 × 0.8 H1 : p ≠ 0.025) -1.96 region of rejection (0.8 = − 3.2 = 0.0327 The z–test statistic: z= The critical value zc at 5% level: zc = −1.95) region of rejection (0.058 0. at α = 0.025) region of acceptance (0.96 (zc) z = -3.0327 150 p− p σp 0. H 0 : p = 0.058 test statistic 0 1.8 alternatively.7 q = 0.3 n = 150 We are to test the expected proportion of the sample against the actual sample proportion.Solution The null hypothesis H0 is that the original proportion estimate of promotability.7 − 0.

with 33 complying with the pollution standards. Test the null hypothesis that 60% are complying with pollution standards at the 1% level of significance.779 critical value zc at 1% level: zc = -2.0642 z= z = −0.0642 z-test statistic: z= p− p σp 0. Example 18 A member of a public interest group concerned with industrial pollution estimates that less than 60% of all factories comply with pollution standards. 60 q= 27 = 0.6 × 0.55 − 0.We reject the null hypothesis at α = 0. 40 . Solution H 0 : p = 0.33 (one tailed test).6 0.45 . 60 n = 60 standard error: σp = pq n 0.05 level of significance.05 .55 . A sample of 60 factories are sampled.6 p= 33 = 0. The true proportion of promotable employees is not 80% . The company should conclude that there is a significant difference between the expected (or hypothesized) proportion and the observed or actual proportion at the α = 0.4 60 = = 0.6 H1 : p < 0.

5 p= 220 = 0.5 0. 220 are men. can sponsor conclude that the desired sex composition of the audience is not properly maintained? Solution H 0 : p = 0. Example 19 The sponsor of a weekly television show would like the studio audience to consist of an equal number of men and women. Using a level of significance of 0.5 H1 : p ≠ 0.55 − 0.01 . even though the actual sample proportion is indeed below the expected proportion is indeed below the expected proportion.region of rejection region of acceptance zc = -2.5) 400 σ p = 0.5) ( 0. it is not significantly below this figure at the 1% level of significance.25 z-test statistic: z= p− p σp 0.33 critical value 0 z = -0.779 z-test statistic z scale We accept the null hypothesis.45 standard error: σp = ( 0.25 z= z=2 41 . Out of 400 persons attending the show on a given night.55 400 n = 400 q = 0.

11 900 n = 900 q = 0.critical value: zc At 1% level zc = 2.05 level of significance.11 − 0.01 (one-tailed test at α = 0.01 z-test statistic: critical value: p − p 0.05 .89 standard error: σp = z= ( 0. Exercise 3(a) 42 . the AMA does not have enough evidence to reject the claim made by the Department of Health. the null hypothesis cannot be rejected using the .1 = =1 σp 0.58 (two tailed test) ∴ we accept null hypothesis at this level of significance.1) ( 0.64 .0 .9 ) 900 = 0. which is less than 1.64 Since z is 1. 99 possessed adequate private health insurance? Use a level of significance of .1 p= 99 = 0. Education. What would the Australian Medical Association (AMA) conclude about the Department’s claim if. Example 20 The Department of Health. Solution H 0 : p = 0. out of a random sample of 900 elderly persons. and Welfare. Education and Welfare reports that only 10% of all persons over 65 years old are covered by adequate private health insurance. In other words.1 H1 : p > 0.05) zc = 1.

p1 is the sample proportion with n1 values p2 is the sample proportion with n2 values (iii) Mean of Sample Proportions The mean or expected proportion for each respective sample equals their population proportions. or p1 < p2 (one-tailed) (v) We wish to examine the difference between the two proportions: pd = p1 − p2 43 . H 0 : p1 = p2 The alternative hypotheses would be either: H 0 : p1 ≠ p2 H1 : p1 > p2 or (two-tailed) . (ii) μ p1 = p1 μ p 2 = p2 (iv) Hypotheses If p1 and p2 denote the population proportions then the null hypothesis is that there is no significant difference in their proportions. each containing respectively n1 and n2 data values. Sample Proportions For two samples.8 Hypothesis Testing Between the Proportions (i) In this section we will discuss the difference between the proportions of two samples.

So in practice we calculate σ d using: σd = p1q1 pq + 2 2 n1 n2 (vii) Overall Proportion If we hypothesize that there is no difference between the two proportions. ˆ If p is the overall proportion of success for both samples. and thus we need to estimate them from the sample proportions. σ d . then our best estimate of the overall proportion of successes is the combined proportion of successes in both samples. then: ˆ p= n1 p1 + n2 p2 n1 + n2 (viii) The standard error of the difference between the two proportions using ˆ the overall proportion. we do not know the population proportions.Standard Error The standard error (standard deviation) of the difference between the two proportions p1 and p2 is given by: σ d = σ p1 − σ p2 σd = p1q1 p2q1 + n1 n2 However. is given by: 44 .

we used.ˆ σd = ˆˆ ˆˆ pq pq + n1 n2 (ix) z-test statistic To test whether the null hypothesis is accepted or rejected we determine the z-score and then test this value against the critical value (zc) at a given level of significance. z : z= p− p σp When calculating the z-score for two proportions hypothesis testing we replace: p for p d = p1 − p 2 ˆ σ p for σ d = pd for p = p1 − p2 ˆˆ ˆˆ pq pq + n1 n2 z= pd − pd ˆ σd 45 . When testing one proportion.

71 100 29 = 0. Group 2 contained 90 animals. with 71 showing lower blood pressure levels with drug A .29 100 Group 2 p2 = q2 = 58 = 0.05 level of significance.3211 ˆ p = 0. Solution Group 1 p1 = q1 = 71 = 0.05 Two-tailed test (a) Overall Proportion Estimate ˆ p= n1 p1 + n2 p2 n1 + n2 ˆ p= 100 ( 0.644) 100 + 90 ˆ q = 0. Test to see if there is a difference between the effectiveness of the two drugs at a 0.644 90 32 = 0.Example 21 A drug company tests two compounds intended to reduce blood pressure levels.6789 46 . H 0 : p1 − p2 with.71) + 90(0.356 90 n1 = 100 n2 = 90 The null hypothesis is that there is no difference between their population proportions. The compounds are given to different groups of animals. with 58 showing lower blood pressure levels with drug B . Group 1 contained 100 animals. H1 : p1 ≠ p2 at α = 0.

6789 ) ( 0.71− 0.96 (zc) z-statistic = 0.973 0.95) region of rejection (0.025) -1. (at α = 0.96 (case 1).3211) + ( 0.066 − 0 = 0.0678 region of rejection (0.644 = 0.025) region of acceptance (0.05 ) .066 ∴ z= 0.6789 ) ( 0. we accept the null hypothesis and conclude that these two drugs produce effects on blood pressure that are not significantly different.0678 (c) Critical Value At a 5% level of significance for a two-tailed test the zc critical values are +1.96 (zc) 0 1.973 z scale The difference between the two sample proportion lies within the acceptance limits.(b) Standard Error ˆ σd = ˆˆ ˆˆ pq pq + n1 n2 ˆ σd = ( 0. Thus.3211 ) 100 90 ˆ σ d = 0. 47 . (d) z-test statistic z= pd − pd ˆ σd pd = 0 ( i.e H0 : p1 = p 2 ) pd = p1 − p 2 = 0.

in area A.Example 22 A dental inspector found that.12) 200 + 150 38 = 0. Does this indicate any difference in proportions at a 1% level of significance? Solution Area B p1 = q1 = 20 = 0. while in area B. H 0 : p1 = p2 H1 : p1 ≠ p2 (a) (two tailed) Overall Proportion Estimate ˆ p= n1 p1 + n2 p2 n1 + n2 ˆ p= ˆ p= 200 ( 0.1) + 150(0.9 200 Area B p2 = q2 = 18 = 0. 20 out of a random sample of 200 had tooth decay.1 200 180 = 0.109 = 0. is that there is no difference in the proportion of tooth decay in the two areas.891 48 .109 50 ∴ ˆ q = 1 − 0.12 150 132 = 0.88 150 n1 = 200 n2 = 150 The Null hypothesis H0 . 18 our of a random sample of 150 had tooth decay.

05) region of acceptance (0.1 − 0. Accept the null hypothesis.12 = = −0.58 (d) z= z-test statistic ˆ pd − pd 0.05) -2.109 ) ( 0. 49 .109 ) ( 0.(b) Standard Error ˆ σd = ˆˆ ˆˆ pq pq + n1 n2 ˆ σd = ( 0.59 ˆ σd 0.0337 (c) Critical Value At a 1% level of significance zc = ±2.58 (zc) z-test statistic z = 0.891) 200 + ( 0.58 (zc) z scale The difference between the two samples proportions is not significant at 1% level.0337 region of rejection (0.59 0 2.95) region of rejection (0.891 ) 150 ˆ σ d = 0.

then the management of the power plant will install the former system.24 n2 = 250 Overall Proportion Estimate ˆ p= n1 p1 + n2 p2 n1 + n2 ˆ p= 200 ( 0.76) 450 ˆ p = 0. The first system has reduced the emission of pollutants to acceptable levels 68 percent of the time.Example 23 A coal-fired power plant is considering two different systems for pollution abatement.68) + 250(0.32 n1 = 200 (a) (one tailed test at α = 0.276 0.68 q1 = 0.01 in making its decision? Solution H 0 : p1 = p2 H1 : p1 < p2 p1 = 0.724 × 0.276 + 200 250 ˆ σd = ˆ σ d = 0.01) p2 = 0. Which system will be installed if management uses a significance level of 0.724 ˆ q = 0. more expensive system has reduced the emission of pollutants to acceptable levels 76 percent of the time. as determined from 200 air samples. If the expensive system is significantly more effective than the inexpensive system in reducing pollutants to acceptable levels. The second.76 q2 = 0. as determined from 250 air samples.724 × 0.276 (b) Standard Error ˆ σd = ˆˆ ˆˆ pq pq + n1 n2 0.0424 50 .

a proposed new method. Instead we must use the Chi-square test. We used one-sample tests to determine whether a mean of a proportion was significantly different from a hypothesized value.(c) Critical Value zc = −2. If this is the case the current z-test would not be applicable. (ii) 51 .01 (one tailed) (d) z-test statistic z= ˆ pd − pd ˆ σd pd = 0 ˆ pd = 0.33 α = 0. (iii) Contingency Tables Suppose that in four regions.08 − 0 = − 1.0424 Accept H0 : install cheaper system Exercise 3(b) 9 Chi-Square Analysis (i) We have investigated hypothesis tests from either one or two samples. Chi–square Tests Suppose we have more than two proportions to examine. the National Health Care Company samples its hospital employees’ attitudes toward job performance reviews. to decide whether this difference was significant.08 ∴ z= −0.89 0.76 = − 0. Respondents are given a choice between the present method. we examined the difference between the two means or two proportions. In the case of twosample tests. Chi-square tests enable us to test whether more than two population proportions can be considered equal.68 − 0.

Notice that the four columns in Table 1 provide one basis of classification – geographical regions. is called a contingency table. rows run horizontally. The expected frequencies. columns vertically. The “total” column and the “total” row are not counted as part of the dimensions. f0 . (table 3).and that the two rows classify the information another way. H0 : region and choice of method are independent alternately. A table such as this is made up of rows and columns. are those which are theoretically expected by considering the overall proportions of each classification.The table below. are the actual values obtained. preference for review methods. fe . We describe the dimensions of a contingency table by first stating the number of rows and then the number of columns. Table 9-1 is called a “2×4 contingency table”. H1 : region and choice of method are dependent (v) Observed and Expected Frequencies The observed frequencies. because it consists of two rows and four columns. illustrated the response to this question from the sample polled. which are recorded on the original contingency table. The expected frequencies in a contingency table are determined by using the following formula: RT × CT n fe = 52 . method present new total Northeast 68 32 100 Southeast 75 45 120 region Central 57 33 90 Westcoast 79 31 110 total 279 141 420 table 3 (iv) Hypotheses The null hypothesis (H0) in this case is that there is no relationship between the employee’s attitudes to job performance reviews and the region that they live in.

(table 5): 53 . the f e value for someone who prefers the present method in the Northeast region is given by: 100 × 279 = 66.21 Westcoast 79 73. method present Northeast 68 66.28 Central 57 59.43 420 fe = The table below. gives a summary of the observed and expected frequencies from table 1.07 31 36.79 33 30.72 45 40. (table 4). we can establish the Chi-square statistic.57 Southeast 75 79.43 32 33.where: fe RT CT n = = = = the expected frequency in a given call the row total for the row containing that cell the column total for the column containing that cell the total number of observations For example.93 f0 fe f0 fe table 4 new (vi) Chi-square Statistics The chi-square statistic χ 2 is given by: χ 2 (f −f ) =∑ 0 e fe 2 Using the information in table 4.

we must calculate the number of degrees if freedom (v) in the contingency table: v = (r − 1)(c − 1) .07 33.4812 . 20 .93 -1. If this value were as large as.72 2.79 -5.93 ( fo − fe ) 2.2795 . As in the case of the t distribution.72 59. say. there is a different chi-square distribution for each different number of degrees of freedom. since the differences between the observed and expected frequencies are always squared. The chi-square distribution is a probability distribution. it would indicate a substantial difference between our observed values and our expected values.1301 . can be closely approximated by a continuous curve known as chi-square distribution.78 35.2575 .764 is the value for chi-square in our problem comparing preferences for review methods. the total area under the curve in each chi-square distribution is 1. (viii) Chi-square Distribution If the null hypothesis is true.21 36.16 total 2 ( fo − f e )2 fe .43 79.f0 68 75 57 79 32 45 33 31 fe 66.28 30. χ 2 .28 7.0370 . indicates that the observed frequencies exactly match the expected frequencies. (ix) Degrees of Freedom To use the chi-square test.93 f o − fe 1.57 40.57 4.764 fe 2 (vii) Interpretation of Chi-square The answer of 2.57 -4. The value of chi-square can never be negative.28 7. Therefore.79 5.7638 table 5 χ =∑ 2 ( f0 − fe ) = 2.78 35.79 73.46 22.5531 .46 22. 54 .0 .0733 .72 -2.9521 2. on the other hand.16 2. then the sampling distribution of the chi-square statistic. A chi-square of zero.

χ 2 = 2. (figure 5) goes from the left tail of the curve to the chi-square statistic of 7. 55 . acceptance region chi-square distribution for 3 degrees of freedom sample chi-square value of 2. with α = 0.81.05 and v = 3 degrees of freedom equals 7. If the company wants to test the null hypothesis at the 0. Therefore.05 level of significance. and c is the number of columns in the problem. (x) Chi-square Critical Value Returning to our example of job-review preferences of national health care hospital employees.81 figure 5 The chi-square value calculated earlier .05 Since our contingency table for this problem (table 1) has two rows and four columns. Thus the acceptance region for the null hypothesis in the figure below. we use the chi-square test to determine whether attitude about reviews is independent of geographical region. the appropriate number of degrees of freedom is: number of degrees of freedom v = (r-1)(c-1) v = (2-1)(4-1) v = (1)(3) v =3 The chi-square tables reveal that the chi-square critical value.Where r is the number of rows in the problem. our problem can be summarized: H0 : region and choice are independent H1 : region and choice are dependent α = 0. we accept the null hypothesis that there is no difference between the attitudes about job interviews in the four geographical regions.764 0.05 of the area 2.764 7.764 falls within the acceptance region.81 .

documentary.Example 24 Random samples of 160 . Solution (a) Hypotheses H0 : the type of program watched is independent of the city. and 200 persons were selected from Melbourne. 240 . western. Sydney and Brisbane respectively.05 . at a level of significance of 0. Program drama western documentary comedy Melbourne 60 (64) 30 (24) 30 (32) 40 (40) Sydney 100 (96) 30 (36) 40 (48) 70 (60) Brisbane 80 (80) 30 (30) 50 (40) 40 (50) (c) Chi-square Statistic χ =∑ 2 ( f0 − fe ) fe 2 56 . or comedy?” The responses are summarized below: type of program drama western documentary comedy total Melbourne 60 30 30 40 160 number of persons Sydney Brisbane 100 80 30 30 40 50 70 40 240 200 total 240 90 120 150 600 Test the hypothesis that there is a difference in television preferences among the resident in the three cities. The persons selected were asked “What type of television program do you like best: drama. H1 : the type of program watched depends upon the city. (b) Observed and Expected Frequencies Using the formula: fe = RT × CT n we can establish both the observed and expected frequencies in one table. The expected frequencies are in brackets.

667 2 10.535 2 ∴ χ = 10.6 acceptance region 0.25 0.f0 60 100 80 30 30 30 30 40 50 40 70 40 fe 64 96 80 24 36 30 32 48 40 40 60 50 fo − fe -4 4 0 6 -6 0 -2 -8 10 0 10 -10 ( fo − fe ) 16 16 0 36 36 0 4 64 100 0 100 100 total 2 ( f o − fe )2 fe 0.333 2.5 0 1.6 statistic critical value The χ 2 statistic falls in the acceptance region.05 with v = 6 gives χ 2 0. Accept H0 .05 = 12.1)(c -1) = (4 -1)(3 .05 of area χ 2 10.16 0 1.535 12.1) =6 (e) Critical Value 2 From tables χ 0.125 1.5 1 0 0.535 (d) Degrees of Freedom v = (r . 57 . There is no connection between the preference for a program and the city that it is watched in.

50 2 58 .36 0.04 0.07 0.Example 25 A teacher wished to determine whether the performance in a problem solving test is independent of the students’ year at school. 40 from each of Years 8. using the 5% and 1% level of significance. 9.60 0.16 0.27 1. and 10 and graded their performance in a test as A or B as shown in the table below: year 8 9 10 total grade awarded A B 22 18 26 14 27 13 75 45 total 40 40 40 120 Test the hypothesis that performance in the test is independent of the students’ year at school. The teacher selected 120 students. Solution (a) Hypotheses The hypotheses being tested are: H0 : there is no relationship between grades H1 : there is a relationship (b) Observed and Expected Frequencies The table below sets out the observed and expected frequencies (in brackets): year 8 9 10 total A 22 (25) 26 (25) 27 (25) 75 B 18 (15) 14 (15) 13 (15) 45 total 40 40 40 120 (c) Chi-square Statistic f0 22 18 26 14 27 13 fe 25 15 25 15 25 15 f o − fe -3 3 1 -1 2 -2 total ( fo − fe ) fe 0.

99 χ 2 0.05 with v = 2 = 5.χ =∑ 2 ( f0 − fe ) = 1. we can accept the hypothesis that performance is independent of the students’ year at school at both the 1 % and 5 % level of significance.50 fe 2 (d) Degrees of Freedom v = (r-1)(c-1) = (3-1)(2-1) =2 (e) Critical Value From tables also χ 2 0.21 So. Example 26 For random samples of 200 people contacted in each of six states. the number who favoured Australia becoming a republic is recorded in the table below: preference yes no total A 13 2 6 8 20 0 B 10 8 9 2 20 0 C 12 8 7 2 20 0 State D 10 4 9 6 20 0 total E 12 8 7 2 20 0 F 12 0 8 0 20 0 720 480 1200 Test the hypothesis that people in the six states are equally in favour at the 5% level of significance.01 with v = 2 = 9. Solution (a) Hypotheses H0 : people of the states are equally in favour H1 : people of the states are not equally in favour (b) Observed and Expected Frequencies The table below sets out the observed and expected frequencies (in brackets): 59 .

133 0.2 0.1 Reject null hypothesis.533 2.2 1.05 with v = 5 = 11. Exercise 4 60 .533 0 1. Not all states are equally in favour of a republic.8 1.8 0.2 0.8 3.8 0 14 2 2 ∴ χ = 14 (d) Degrees of Freedom v = (r-1)(c-1) v = (2-1)(6-1) v =5 (e) Critical Value 2 From tables χ 0.preference yes no total A 132 (120) 68 (80) 200 B 108 (120) 92 (80) 200 C 128 (120) 72 (80) 200 State D 104 (120) 96 (80) 200 E 128 (120) 72 (80) 200 F 120 (120) 80 (80) 200 total 720 480 1200 (c) Chi-square Statistic f0 132 108 128 104 128 120 68 92 72 96 72 80 fe 120 120 120 120 120 120 80 80 80 80 80 80 f o − fe 12 -12 8 -16 8 0 -12 12 -8 16 -8 0 total ( fo − fe ) fe 1.

61 .

62 .