• No results found

null hypothesis and the alternative hypothesis. In this case: Ho:µ= 26.4

N/A
N/A
Protected

Academic year: 2020

Share "null hypothesis and the alternative hypothesis. In this case: Ho:µ= 26.4"

Copied!
34
0
0

Loading.... (view fulltext now)

Full text

(1)

9

Non-parametric

statistical tests

(2)

9.1 Hypothesis testing: stating the hypotheses

In previous chapters we have been concerned with simplifying and summarising data and describing the relationship between variables. In this chapter we are concerned with this question:

'Given some data for a sample, can we draw any conclusions about the population from which the sample has come?

Such a question involves inferential statistics rather than descriptive statistics.

For example, suppose a teacher wishes to discover whether his/her class is better than average at statistics. The class is given an achievement test and the students obtain the following scores:

38 27 32 43 18 27 36 45 21

35

29

It is known that, for this achievement test, during recent years, students throughout the whole country at this level have obtained a mean score of 26.4. The teacher observes that 9 students in the class have scored above the mean and 2 students have scored below the mean. Can it be concluded that the class is better than average?

On this particular occasion more than half the class has obtained a score of more than 26.4, but the teacher knows that, if the achievement test had been given on a different occasion, the students would be unlikely to obtain exactly the same scores again. The scores which the students obtain are subject to variation depending on such factors as how well they feel when they are doing the test, how many careless slips they make and how the test is marked. If the test was given many times under the same circumstances, we would expect there to be variation in scores from one sample to the other.

If we are testing a statistical hypothesis, we consider only two possibilities in this case, either the class is average and the students' scores are a chance result which has occurred because samples are going to vary anyway, or the class is better than average.

Statistically, this is written as two hypotheses, the null hypothesis and the alternative hypothesis. In this case:

Ho:µ= 26.4 HA: µ>26.4

The first of these hypotheses suggests that, if the class did the achievement test many times under the same circumstances, their mean score would be the same as it is for all the students in the country. The alternative hypothesis su�gests that, if the class did the achievement test many times under the same circumstances, their mean score would be greater than it is for all the students in the country.

In this example the teacher thought the class was better than average. It is possible, of course, that a teacher thinks the class to be not as good as average, in which case the appropriate hypotheses would be:

Ho:µ= 26.4 HA: µ<26.4

It is possible, that a teacher does not know whether the class is better than average or not as good as average, in which case the appropriate hypotheses would be:

Ho:µ= 26.4 HA:µ*- 26.4

(3)

not define more than one population, e.g.µ,>

2

6.4 defines many, many populations, with means of 3

2

.1,

2

6.5,

2

8.7, etc., soµ,>

2

6.4 must not be used as a null hypothesis. The alternative hypothesis may be of the form:

µ,

>

2

6.4 µ,

<

26.4 µ, -=I=

2

6.4

The first two of these are called one-tailed hypotheses. The third one is a two-tailed hypothesis becauseµ, may either be greater than

2

6.4 or less than

2

6.4. The choice of alternative hypothesis depends on information about the investigation. If you are

investigating whether the group performance is better, then choose the one-tailed hypothesis involving> ; if you want to know whether the performance is worse, then choose the one­ tailed hypothesis involving

< ;

if you have no information whether the performance is likely to be better or worse, then choose the two-tailed hypothesis -=I= •

9.2 The sign test

We have stated the hypotheses:

Ho:µ,=

2

6.4 HA: µ,>

2

6.4 and obtained the sample:

38 27 3

2

43 18

2

7 36 45

2

1 35

Allocate + to any score which is greater than 26.4, - to any score which is less than

2

6.4, and Oto any score which is equal to

2

6.4 and obtain the following:

+

+

+

+

+

+

+

+

There are nine results labelled

+

and two labelled - . Let x be the smaller of these two numbers, i.e. x

=

2

.

If the null hypothesis is true then we would expect half the scores to be greater than 26.4 and half the scores to be less than

2

6.4 (assuming that the probability distribution is symmetrical about the mean). If Xis the number of' - ' labels, then Xwould have a binomial distribution with n

=

11 and probability p

=

½·

29

+

Now, find the probability of a result as unlikely as the one which we have actually obtained, assuming that the null hypothesis is true, i.e. find:

So:

Pr(X::,; x), which in this case is Pr(X::,;

2

). Pr(X = 0)

=

(1�) (½)

°

(½)

11

=

0.000 Pr(X = 1)

=

(1/) (½)

1

(½)

=

0.005 Pr(X =

2

)

=

(1

2

1)

(½)

2

(½)

9

=

0.0

2

7

Pr(X::,; 2)

=

0.03

2

(4)

If there are one or more cases in which the score obtained is equal to the value hypothesised under H 0, then this score is completely disregarded. So, in the above example, if the last score had been 26.4 instead of 29, there would be eight labels of'+', two labels of' - ' and one label of '0'. In finding Pr(X:::;; 2), n would decrease to 10.

9.3 Significance level

The null hypothesis is rejected if the probability of obtaining a result as unlikely as the one which was obtained is small. 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. It is necessary to choose a probability and agree that probabilities below this are 'unlikely'. The value which is chosen is called the significance level and it measures the probability of rejecting the null hypothesis when it is true. The significance level which is most often chosen is 0.05, but 0.01 and 0.10 are sometimes used as alternatives.

If the significance level of 0.05 is being used, then Ho will be rejected if the calculated probability is less than 0.05 and accepted if the calculated probability is greater than 0.05. (If the calculated probability is exactly equal to 0.05, then toss a coin to decide whether to accept or reject Ho!).

If the alternative hypothesis being tested is two-tailed rather than one-tailed, then the calculated probability must be compared with 0.025 rather than 0.05, since half the

probability is considered to be in each tail. For a two-tailed test at the 0.05 significance level,

Ho is rejected if the calculated probability is less than 0.025.

9.4 The steps in performing a statistical test

(i) State the null and alternative hypotheses which are to be tested.

(ii) Select a significance level.

(iii) Take a representative sample from the population and calculate the probability of a result as unlikely as the one which is actually obtained, assuming Ho is true. (iv) Compare the calculated probability with the significance level and decide whether to

accept or reject Ho,

Example 1

On the cover of a matchbox it is claimed that the box contains 50 safety matches. When the matches in 10 boxes are counted the following results are obtained:

52 45 48 50 49 51 48 46 48

At the 0.05 significance level, use the sign test to test whether there are 50 matches per box or not.

Hypotheses: Ho: µ = 50 HA:µ ::f::. 5Q Sample:

+ 0 +

There are 2 of +, 6 of - and 2 of 0. Sox = 2, n = 8 0

Calculate probability: . ,,.-/ ,

Pr(X:::;; 2) = (�)

(½)

0

/(})8

1 +

(D

(½)' (½)

7

+ (�)

(½)

2

(½)

6

\/

..

·

= 0.004

+

0.031

+

0.109 = 0.144

Conclusion: Since 0. 144 is greater than 0.025, accept Ho and agree with the claim that there are 50 matches per box.

(5)

Example2

An investigator wishes to discover whether the median length of telephone conversations from an office by the employees is greater than 3 minutes. A typical set of conversations is timed and the following results, in minutes, are obtained:

4.5 2.7 12.8 22.0 4.6 3.0 0.7

At the 0.10 significance level, what should the investigator conclude?

Hypotheses: Ho:

m

=

3.0

HA:

m>

3.0

Sample:

+

+ +

+ 0

There are 6 of +, 3 of - and 1 of 0. Sox

=

3

+

1.5 3.6

+

Pr(X � 3)

= (�)

(½)

°

(½)

9

+

(i) (½)

1

(½)

8

+

G) (½)

2

(½)

7

+

G) GY

(½)

6

=

0.002

+

0.018

+

0.070

+

0.164

=

0.254

Since 0.254 is greater than 0.05, accept Ho and conclude that the median length of telephone conversations is 3 minutes.

9.5 Binomial test of P-ercentiles

---The sign test, which is appropriate for testing hypotheses about the median, can be easily generalised to apply to other percentiles.

Example 3

6.6

Suppose it is known that, on a certain stretch of highway where the speed limit is 1 �0 km/h, 200Jo of drivers exceed the speed limit by more than 10 km/h. Traffic police patrol that area and claim that, as a consequence, the percentage is reduced to much less than 20%. An independent observer finds that, for a random sample of 10 cars, one is travelling more than 10 km/h above the speed limit. What can we conclude?

Before the police patrols, the 80th percentile of car speeds was 110 km/h. We wish to know whether the 80th percentile has fallen below 110 km/h as a result of the police patrols.

Ho: Po.so

=

110 HA: Po.so< 110

Let Ybe the number of cars travelling at a speed of less than or equal to 110 km/h. If Ho is true, then Y will have a binomial distribution with n = 10 and p = 0.80. If Ho is true, then we would expect eight cars (np) to have speeds of less than or equal to 110 km/h, but in the observed sample we found there were nine. We must find the probability of a result as unlikely as the one which we have obtained, assuming the null hypothesis is true. The result, 9, is larger than expected, so we find the probability of nine or more.

(6)

Pr(Y ;;;i, 9) = Pr(Y = 9)

+

Pr(Y = 10)

= (19°) co.80)9(0.20)1 +

cg)

co.80)10 co.20)0 = 0.268

+

0.107

= 0.375

If we compare this with a significance level of 0.05 we will accept Ho and conclude that there is not sufficient evidence to be able to say that the 80th percentile of car speeds has fallen below 110 km/h.

Actually, it is most unlikely that an investigator would be content to find the speeds of only 10 cars. Suppose, instead, that 100 cars were observed and 11 of them were found to be travelling more than 10 km/h above the speed limit.

We still have:

Ho: Po.so= 110 H.A: Po.so< 110

Y still has a binomial distribution withp = 0.80, but now n = 100 and we have to calculate

Pr(Y ;;;i, 89), which is:

(18°i) (0.80)89 (0.20)11

+

(19°g) (0.80)90 (0.20)10

+ ... +

egg)

(0.80)100 (0.20)0 This would be a tedious task and it is preferable to make use of a normal approximation to help in the cAl,.11\ation. For this binomial distribution:

µ = np = 100 X 0.80 = 80

u = --.f npq = --.flO0 X 0.80 X 0.20 = 4 Then: Pr(Y ;;;i, 89)""' Pr

(z

;;;i: 89;80)

""' Pr (z ;;;i, 2.25)

= 0.0122, from standard normal tables.

If we compare this calculated probability with a significance level of 0.05, we will reject Ho and conclude that the 80th percentile of car speeds is below 110 km/h.

Exercises 9a

1 State suitable null and alternative hypotheses for each of the following cases. a An intelligence test is designed so that the average score by the whole normal

population is 100. A teacher wishes to know whether a particular class can be considered to have come from a population of normal intelligence or from a population of above-normal intelligence.

b Pulse rate is normally 72 beats per minute. A coach at the Institute of Sport wishes to know whether athletes who come to the Institute have a pulse rate which is significantly different from normal.

c Records kept by an insurance company indicate that the average length of confinement for a routine appendix removal is 4.2 days. The administration of one hospital thinks that the length of confinement at that hospital is less than 4.2 days.

(7)

2 A random sample of size 12 is taken from a distribution which is symmetrical about the median and the following data are obtained:

6.2 3.3 4.2 6.8 2.9 7.7 4.3 3.9 8.2 6.4 5.7 4.0

Test the hypothesis Ho:

m

= 6.5 against the one-sided alternative hypothesis HA:

m

<

6.5, where mis the median of the population from which the sample has been taken. Use the 0.05 significance level.

3 A pipette is designed to deliver a volume of 50.0 mL of liquid. The manufacturer tests a random sample of eight such pipettes and finds that they deliver the following volumes, in mL:

49.9 49.8 49.6 50.1' 49.9 50.0 49.8 49.7

Is the volume of liquid delivered by the pipettes significantly less than 50.0 mL at the 0.10 level of significance?

4 A golfer averages 88 strokes for 18 holes of golf. After receiving golf lessons she believes she has improved and that her average is now less than 88. In the next six rounds she plays she has scores of:

83 92 85 82 88

Do these data support her feelings that the lessons have produced a significant improvement? Use a 0.10 level of significance.

80

5 A sample of 11 rats was randomly obtained from a population of rats. A blood viscosity test of the rats resulted in the following measurements:

4.68 3.85 3.21 4.62 3.50 3.67 4.01 4.84 3.95 3.67 3.75 Assuming that the distribution of blood viscosity about the mean is symmetrical, use the sign test to test the null hypothesis (that the mean blood viscosity is 4.5) against the alternative hypothesis (that it is not equal to 4.5). Use a 50Jo level of significance.

A physical education teacher knows from past experience that ?OOJo of runners in the

cross-country run are able to complete the course in 24 minutes:This year, the students have been given a training programme to prepare them for the cross-country run and the teacher feels confident that the fastest 200Jo of runners will now complete the course in 5than_24 Illi!1Mtes. For a rand5msample 0{10 st�dents, four are able to complete

the course in 24 minutes. - - -- - .

Test the hypotheses: Ho: Po.20 = 24

HA: Po.20

<

24

at the 0.05 significance level.

b For a random sample of 10 students, what is the least number who would have to complete the course in 24 minutes in order for the null hypothesis to be rejected at the 0.05 significance level?

c On a later occasion, for a random sample of 81 students, 23 completed the course in 24 minutes. Using this information, test the same hypotheses at the same significance level.

7 A machine is designed to fill jars with 100 g of coffee each. It is found that lOOJo of the

(8)

; /Ti test whether jars do contain 100 g of coffee, as claimed on the label, a consumer group selected a random sample of 144 jars and found that 84 of the jars contained less than 100 g. Perform a two-tailed sign test at the 5% significance level to discover whether the jars do contain 100 g of coffee or not.

9 A machine is designed to produce plastic sheeting with weight 16 kg/ m 2• In a random sample of 32 sheets, the sheets have the following weights in kg/ m 2

16.1 15.9 16.4 16.4 16.3 15.6 16.0 15.6 16.5 16.2 15.8 16.1 15.8 16.3 15.8 16.1 16.0 16.1 17.2 16.3 16.2 16.1 15.6 16.2 16.7 16.6 16.3 15.7 17.0 16.2 16.1 16.8 Test the hypothesis that the weight is 16.0 kg/m2 against the one-sided alternative that

it is more than 16.0 kg/m2, at the 0.10 significance level.

9.6 Wilcoxon test for two independent samples

On many occasions we want to compare two groups. Does a group of patients who are given therapy respond more quickly than a group without therapy? Do girls perform as well as boys at Mathematics? Does one type of golf ball travel farther than another type when they are hit equally hard? Does one type of car have a better fuel economy than another type? The Wilcoxon rank-sum test is designed to determine whether two independent samples have come from the same population. If they do come from the same population, then the population means for the two groups are equal, so this test provides a convenient method for testing the hypotheses:

Ho: µA= µB HA: µA* µB

To perform the test, the sample data from the two groups are combined, placed in order from smallest to largest, and then ranked. Then the sum of ranks is calculated for one of the groups. If the null hypothesis is true the ranks will be evenly distributed between the two groups; if the alternative hypothesis is true then one of the groups will have more of the smaller ranks than the other group and its sum of ranks will tend to be small. If the sum of ranks is sufficiently small we will reject Ho.

Example 4

Suppose two different kinds of light bulbs are used continuously until they 'blow' and the number of hours are recorded:

A 460 360 580 390 710 420

B

620 715 550 780

Is there any significant difference between the lives of the two types of bulbs?

The hypotheses being tested are: Ho: µA= µB

HA: µA* µB

First step: Combine the data and order them, from smallest to largest: 360 390 420 460 550 580 620 710 715 780

Second step: Allocate ranks and list which group each rank belongs to:

1

(9)

Note:

Third step: Find the sum of ranks (W) for either Group A or Group B: WB = 5

+

1

+

9

+

10 = 31

Fourth step: Calculate the probability of a result as unlikely as this. In this example Group A tends to have small ranks and Group B tends to have large ranks, so we find Pr(W � 31).

To find this probability, first list all the ways in which the sum of four different ranks (which are all less than or equal to 10) can have a sum which is greater than or equal to 31:

7

+

8

+

9

+

10

=

34

6 +

8

+ 9 +

10

=

33 5

+

8

+

9

+

10

= 32

4

+

8

+

9

+

10

=

31 6

+

7

+

9

+

10

=

32 5

+ 7 + 9 +

10

=

31

6

+

7

+

8

10 = 31

i.e. there are only seven ways to obtain a rank-sum greater than or equal to 31 by using four of the 10 ranks.

The total number of ways it is possible to choose four ranks from 10 is (�0) , i.e. 210, ways. Under Ho all of these ways would be equally likely.

So, under Ho:

7 1

Pr(W � 31)

=

210

=

30

=

0.033

Final step: draw a conclusion.

For a two-tailed test at 0.05 significance level, we compare 0.033 with 0.025 and, since it is not unlikely, we accept Ho and conclude that there is no significant difference between the lives of the two types of light bulbs.

Suppose, in the third step we had chosen to use group A: WA = 1

+

2

+

3

+

4

+

6

+

8

=

24

Since these ranks tend to be small, we must find the probability of obtaining a sum of ranks equal to this or smaller, i.e. Pr(W � 24).

1

+

2

+

3

+

4

+

5

+

6

= 21

1

+

2

+

3

+

4

+

5

+

7 = 22 1

+

2

+

3

+

4

+

5

+

8

=

23 1

+

2

+

3

+

4

+

5

+

9

=

24 1

+

2

+

3

+

4

+

6

+

7

=

23 1

+

2

+

3

+

4

+

6

+

8

= 24

1

+

2

+

3

+

5

+

6

+

7 = 24

There are seven way__l>�of obtaining a rank-sum less than or equal to 24 and

(1

6

°),

i.e. 210, ways of choosing

6

ranks from 10.
(10)

9. 7 Dealing with ties

It is possible that two or more of the observed values are equal, so their ranks are tied. For example, suppose the following data are obtained for two groups:

X: 27 42 63 36 25 18 46 53 42 Y: 31 45 25 39 42 40

The data are combined and ordered, from smallest to largest:

Order 18 25 25 27 31 36 39 40 42 42

Rank 1 4 5 6 7 8

42 45 46 53 63 12 13 14 15

Slight difficulties arise because 25 occurs twice and 42 occurs three times. When ties occur, the ranks which would have been allocated to these scores are shared between them. The ranks of 2 and 3 would have been given to the two scores of 25, so each of them is allocated a rank of 2½. The ranks of 9, 10 and 11 would have been given to the three scores of 42, so each of them is allocated a rank of 10. The set of ranks, and the groups which they came from now look like this:

1 21 2 2; 4 5 6 7 8 10 10 10

X X y X y X y y X X y

The rank-sums can be found as usual:

Wx = 1 + 2½ + 4 + 6 + 10 + 10 + 13 + 14 + 15 = 75½ Wy= 2½ + 5 + 7 + 8 + 10 + 12 = 44½

12 13 14 15

y X X X

However, whenever ties occur, the method for calculating the probability, which is described in Section 9.6, cannot be used and the approximate method, which is described in Section 9.8, must be used instead.

9.8 Dealing with large samples

Suppose the samples we are considering each have 100 scores and the sum of ranks for one of the groups is 8460 and for the other group is 11640. Clearly, the task of listing all possible ways of adding 100 ranks so their sum is less than or equal to 8460 would be a long and tedious one. In such circumstances it is better to assume that the distribution of Wis approximately normal, and calculate the probability approximately. The larger the sample the better the approximation will be.

It can be proved that, if there are a scores in Group A and b scores in Group B then the population mean and variance of WA (the sum of ranks for Group A) are:

_ a (a+ b + 1) µWA - 2

2 _ ab (a + b + 1)

(11)

For example, in this case, a = 100 and b = 100.

So:

µwA = 100 X 201 = 100502 100 X 100 X 201

12

=

167500

O"WA = 409,3

Pr ( w � 8460) A ..._,

=

P (z � 8460 - 100500)r ..._, 409.3

=

Pr (z � - 3.885) = Pr (z ;;:: 3.885) = 0, approximately. If we were testing the hypotheses:

Ho:µA

=

µB

HA: µA <µB

at the 0.01 significance level, we would reject Ho,

9.9 Permutation test

An alternative test for comparing two groups makes use of permutations of the

observations. This method has the advantage that it uses the raw data rather than ranks, and the disadvantage that it is a little more difficult to use than the Wilcoxon test.

Example 5

A typewriter sales representative claims that her typewriter will increase typewriter efficiency. Six typists are randomly selected from the typing pool, four of them use the old model (M) and two use the new model (N). The number of words per minute which are typed for a 20 minute period are:

M 57

N 68

We wish to test the hypotheses: Ho:µM

=

µN

HA: µM <µN

50 64 60 61

(12)

So the number of different permutations is (�) and each of these is repeated 4! 2! times. We list all the 15 possibilities and, in each case, calculate the mean iim for

the first four and the mean ii,, for the other two .

M N

50 57 60 61 64 50 57 60 64 61 50 57 60 68 64 50 57 64 61 60 50 57 68 61 64 50 64 60 61 57 50 68 60 61 64 64 57 60 61 50 68 57 60 61 64 50 57 64 68 60 50 64 68 61 57 64 68 60 61 50 50 64 60 68 57 64 57 68 61 50 64 57 60 68 50

um

68 57.00 68 57.75 61 58.75 68 58.00 60 59.00 68 58.75 57 59.75 68 60.50 50 61.50 61 59.75 60 60.75 57 63.25 61 60.50 60 62.50 61 62.25

Un 66.00 64.50 62.50 64.00 62.00 62.50 60.50 59.00 57.00 60.50 58.50 53.50 59.00 55.00 55.50

u -u n m

9.00 6.75 3.75 6.00 3.00 3.75 0.75 -1.50 -4.50 0.75 -2.25 -9.75 -1.50 -7.50 -6.75

If the alternative hypothesis is true then ii,, -Um is greater than zero. Permutations

for which ii,, -Um is large indicate that Ho would be rejected in favour of HA,

For the data obtained in the samples:

Um = 57.75, ii,, = 64.50 and ii,, -Um = 6.75.

Of the 15 possible permutations, two have values of ii,, -iim which are greater than

or equal to 6.75:

i.e. Pr(ii,, -Um � 6.75)

=

125

=

0.13

At the 0.0 5 significance level we accept Ho. If the hypotheses being tested were:

Ho: µM = µN

HA: µM

*

µN

then the test would be based on

I

ii,, -Um

I ,

i.e. the probability that

I

ii,, -Um

I

is greater than or equal to that which occurs for the sample data. For small samples the calculation of the probability should be carried out by listing all the possible permutations and calculating ii,, -iim for each.

For large samples it can be shown that, under the null hypothesis, if U = ii,, -Um,

then the mean and variance of U are: µu = 0

a2u =

(!+i)

(

m

n

)

(�(um -iim)

2 +�(u

11 -ii11)2)

Then, if U

=

12.2, say:

( 12.2 -µu)

(13)

Exercises 9b

�\<:.;tate suitable null an:d alternative hypotheses for each of the following cases.

ll/a

The number of double faults served by two tennis players, Band L, in eight sets were:

I : I : I : I : I : I : I : I . I : I

Is there a significant difference between the average number of double faults per set, served by B and L?

b Two different steroids are injected into two sets of randomly chosen sheep in an attempt to produce an increased entry rate of glucose into the blood plasma of sheep. The rate of glucose entry in mg I min is as follows:

Steroid A 38.8 33.3 18.9 18.8 54.8 36.8

Steroid B 45.6 58.3 56.0 38.2

Is Steroid B more effective than Steroid A?

c A horticulturalist wishes to investigate the phosphorus content of leaves from two different varieties of tree. Random samples from six trees of each variety are analysed and the phosphorus content is determined:

X 0.66 0.71 0.91 0.85 0.79 0.64

y 0.59 0.79 0.74 0.72 0.65 0.65

Does one variety of tree produce leaves with a higher phosphorus content than the other?

2 five samples are taken randomly from distributions which are symmetrical about the mean and the following data are obtained:

H 6.2 6.8 7.7 3.9 8.2

J 3.3 4.2 2.9 4.3 5.7

Test the null hypothesis, µ,H = µ,J> against the one-sided alternative hypothesis,

µ, H

>

µ, J> using the Wilcoxon Test at the 0.05 level of significance.

3 The burglary rates in some country towns in Victoria and New South Wales are:

V 9.6 10.1 7.7 4.4 11.0

N 12.9 10.6 11.4 8.8

(14)

4 The age at time of death for random samples of two ethnic groups were:

\"

Group A 67 69 57 75 92 71 77 79 73 83 78 54

Group B 82 71 82 53 88 55 69 69 74 64 83 77

Is there a significant difference in the life-expectancy of the two ethnic populations? Use the 0.05 significance level.

5 1:'he number of cavities in the teeth of children using two brands of toothpaste are c;bmpared. Eight children are randomly allocated to each of the brands of toothpaste and, after 12 months, the number of cavities are:

Mintsweet

Sparklesmi/e

Is there sufficient evidence at the 0.10 significance level to say that Mintsweet is the more effective in preventing cavities?

' 6 A class was divided into two groups of equal ability and one group (Group 1) was taught using worksheets while the other group (Group 2) was taught by teacher explanations to the whole group. After one month the two groups were given the same test and the results were:

Group 1 1-S 23 1..2 tff H5

,,a

;yi( 22 24 �26 22 ,11' .:t,11:·

Group 2 .. 29-. -t1 ,A'5 1, � � ,� �· -tO ,1-6 � �

,e--/ ,, / /

Is there a significant difference, at the 5% significance level, between the two teaching methods?

7 If,.. company which organises school camps holds the theory that September is a sunnier month than October, and measures the number of sunny hours on six randomly chosen days of the month:

September 4.1 2.5 0.3 6.0 5.4 2.2

October 1.6 0.8 1.2 2.1 3.6 0.4

Use the Wilcoxon test to decide whether these data are consistent with the theory that September is the sunnier month. Use the 0.10 level of significance and calculate the probability:

a exactly

b using the normal approximation.

8 A lawyer, who wishes to trade in her car on a new one, is uncertain whether city dealers or country dealers would give a better trade-in. She obtains the following quotes, in thousands of dollars:

City 10.6 11.2 9.6 12.0

(15)

a Write the 15 possible permutations of these six results, when there are four in one group and two in the other.

b What is the difference in the mean trade-in for the two groups in her sample? How many of the permutations have a mean difference greater than or equal to this calculated difference?

c If she is testing:

Ho:

I

/A-city - /A-country

I

= 0

HA: I /A-city - /A-country I

>

0

what should she conclude? Use the 50Jo level of significance.

9 Two different types of car are tested for fuel economy. The number of litres of petrol needed for 100 km are:

Use:

a the permutation test b the Wilcoxon test

CarJ

CarK

10.8 9.4 9.2

8.9 9.3 9.0

to discover whether there is a significant difference, at the lOOJo significance level, between the fuel economy of the two types of car.

[:l

9.10 Statistical project

Select two groups which you would like to compare. Take measurements for a representative sample of each of the two groups. Perform an appropriate statistical test to discover whether there is a significant difference between the populations from which the samples have come.

9�11 The Chi-square test

(i) A coin is tossed 40 times and 25 heads and 15 tails turn up. On the assumption (null

hypothesis) that the coin is not biassed, do these observed frequencies differ

significantly from the expected frequencies of 20 heads and 20 tails?

(ii) A die is tossed 60 times and the numbers 1, 2, 3, 4, 5 and 6 appear uppermost 7, 15, 10, 14, 8 and 6 times respectively. On the assumption (null hypothesis) that the die is fair, do these observed frequencies differ significantly from the expected frequencies of each number appearing uppermost exactly 10 times?

(iii) A telephonist observed that over a period of 200 days, the number of 'wrong number' telephone calls per day was as follows:

Number of wrong numbers per day 0 1 2 3 4 >4

Number of days 106 76 12 4 2

Do these observed frequencies differ significantly from the expected frequencies on the assumption that the number of wrong numbers per day is a Poisson variable?

(16)

By means of the x2 distribution (pronounced kye-square, and frequently written as chi­

square), we can test the null hypothesis in situations similar to those outlined above. We can calculate x2 using the formula:

X2 = � [ (0 � E)2

]

where O is the observed frequency and Eis the corresponding expected frequency. Note that the data in the previous tests were real numbers which resulted from

measurements, but the data for x2 tests are whole numbers which result from frequency

counts.

Example 6

A coin is tossed 40 times and 25 heads and 15 tails turn up. Evaluate x2 on the assumption

that the expected frequencies are 20 heads and 20 tails.

Note:

We first state the hypotheses which are being tested. The population with which we are concerned consists of every occasion on which this coin has been tossed or ever will be. We have a sample from that population. The null hypothesis is: 'For the whole population, the number of heads and the number of tails will be equal'. The alternative hypothesis is that this is not so.

Ho: nH = nT HA: nH -=I= nr

We next set out the data in tabular form, showing the observed frequencies (0) and the expected frequencies (E).

Heads

0 25

E 20

x2 = � [ (O �

E)

2

]

= (25 - 20)2

+ (15 - 20)2

20 20

= 1.25 + 1.25 = 2.5

Tails Total

15 40

20 40

If the observed frequencies were equal to the expected frequencies, then: x2 = (20 - 20)2

+ (20 - 20)2 = 0

20 20 .

The value of x2 will increase or decrease in accordance with the size of the discrepancy between observed and expected frequencies. The larger the discrepancy, the larger is the value of x2Large values of x2 will lead to the rejection of the null hypothesis. If, for

example, there are 30 heads and 10 tails when the coin is tossed 40 times, then: x2 = (30 - 20)2 + (10 - 20)2 = 10

(17)

Example 7

A die is tossed 60 times. The table below shows the observed frequencies (0) and the expected frequencies (E) on the assumption that the die is fair. Evaluate x2

1 2 3 4 5 6 Total

0

7

15 10 14 8 6 60

E 10 10 10 10 10 10 60

@

It may be convenient to set out the data in columns.

(0 - E}2

Number 0 E 0-E (0 - E)2 E

1 7 10 -3 9 0.9

2 15 10 5 25 2.5

3 10 10 0 0 0

4 14 10 4 16 1.6

5 8 10 -2 4 0.4

6 6 10 - -4 16 1.6

60 60 7.0

x2

= �[<O � El2] = 7.0

If there was a smaller discrepancy between the observed and expected frequencies, then x2 would be closer to zero. For example, if 1 occurred nine times and 2 occurred 11 times and the other numbers occurred 10 times each, then:

x2 = (9 - 10}2 + (11 - 10}10 10 2 + (10 - 10}2 + 10 . .. = 0.2

9.12 Degrees of freedom,-,,

After we calculate x2, we need to take into account what is called the number of degrees of freedom, 11 (pronounced new) that are available in its calculation. In Example 1, there are two pairs of 0 and E values, or two classes Whose total in both cases is 40. Only one set of the observed frequencies is free because, when we know that the number of heads is 25, then, by subtraction from 40, we know that there are 15 tails. The number of tails is dependent on the number of heads for a fixed number of tosses. So 11 = 2 - 1 = 1. In Example 2, there are six pairs of 0 and E values or six classes. Only five of these sets of observed frequencies are free, because when we know any five of these sets, the remaining set can be obtained by subtraction from 60. In this �se, 11

=

6 - 1

=

5.

There will always be at least one degree of freedom. 111 each of Examples 1 and 2, there was only one restriction, broufht about by the fact that the total of the observed and expected frequencies was the same in each case.

"�

(18)

every possible occasion in which that coin has been tossed, or ever will be tossed, 40 times. We know from experience that, when we take many samples from a population, there is a good deal of variation in the samples. Four such samples of coin tosses have just been given on the previous pages.

If the probability of obtaining heads for the whole population is exactly the same as obtaining tails, then, when we take a sample, it is likely that there will be about 20 heads and 20 tails in 40 tosses. However, it is possible, just by chance, that we could get 0 heads and 40 tails. Using the x2 statistic we can attach a probability to the various possible results. Suppose we make the hypothesis that, for this coin, tossed 40 times, there will be the same number of heads and tails, then it can be proved that the probability that x2 3 .84 is 0.05 or 5%.

If we were to draw a graph for different values of x2, we would obtain frequency curves as shown. The shape of the x2 distribution depends on the number of degrees of freedom. For one degree of freedom and 10 degrees of freedom the graphs of the distributions are shown in Figures 9-1 and 9-2 respectively.

Probability

V=1

o�---�---2

3.84 X,

Figure 9-1

Probability

V=10

o---�---2

18.3 X,o

Figure 9-2

For one degree of freedom, Figure 9-1 shows a shaded region to the right of

xf

= 3. 84. This area is 50Jo of the total area under the curve and represents the probability that Xi � 3.84.The notation

xr

0_05 = 3.84 means that the probability that Xi � 3.84 is 0.05. If Xi exceeds 3.84, we can say that the observed frequencies differ significantly from the expected frequencies at the 5 OJo level of sign[fic;ance, and that the null hypothesis must be rejected. The tables in Section 9 .19 show the different values of x2 for selected values of

v = 1, 2, 3 ... at different levels of significance. For example,

xt

0_10 = 4.61 for 2 degrees of freedom.

In Example 1, the value of x2 for 25 heads and 15 tails was xi = 2.5. The probability of a result as unlikely as this is greater than 0.05 if the hypothesis is true as shown in Figure 9-3.

Probability

0

2.5

2 Figure 9-3

3 3.84 4

0.05

I

2

(19)

From the tables in Section 9.19, xi, 0_05 = 3 .84, i.e. the value for the sample is less than the table value, so 25 heads and 15 tails do not differ significantly from the expected frequencies at the 50Jo level of significance. If there were 30 heads and 10 tails, then

Xi

= 10, and the probability of this is less than 0.05, and so we would reject the hypothesis that heads and tails are equally likely. If the only information we had was the data from this one sample (30 heads and 10 tails), then we would look for other possible explanations for our unlikely result. Maybe the coin is biassed! In Example 2,

x;

= 7 and, from the tables on page 295,

x;,

0_05 = 11. 1. Therefore the observed frequencies do not differ

significantly from the expected frequencies at the 50Jo level; in fact, not even at the lOOJo level at which

x;,

0_10 = 9.24 (from the tables in Section 9.19).

9.13

x

2

test for a Poisson distribution

Example 8

A telephonist in a city office observed that over a period of 200 days, the number of 'wrong number' telephone calls per day was as follows:

Number of wrong numbers per day 0 1 2 3 4

Number of days 106 76 12 4 2

Do these observed frequencies differ significantly from the expected frequencies, on the assumption that the number of wrong numbers per day is a Poisson variable? In other words, do these observed frequencies support the assumption of a Poisson distribution?

The hypotheses being tested are:

Ho: The number of wrong number calls has a Poisson distribution withµ= 0.6.

HA: The number of wrong number calls does not have a Poisson distribution with µ = 0.6.

X

f

0 106

1 76

2 12

3 4

4

-

2

200

- 120 O 6

X=

200 = '

xf

0

76 24 12 8 120

Using the mea11 x = 0.6 as an estimate of the population meanµ, then we can evaluate the expected frequencies on the assumption of a Poisson distribution from:

200 Pr(X = x) = 200 e -o.:�0-6

t,

x = 0, l, 2, 3 and 4

The expected frequencies are 110, 66, 20, 4, 1. Our null hypothesis, Ho, is that there is no difference between the observed frequencies and those expected from a

(20)

Wrong 0 E

0-E

{O-E}2

numbers

E

0 106 110

-4

0.15

1 76 66 10 1.52

2 12 20 -8 3.2

3

i ]6

1

]5

0.2

4

x2 = 5.07

Since the expected frequencies of 3 or more are rather small, the last two classes can be combined with an observed frequency of 6 and an expected frequency of 5.

The number of degrees of freedom is v

=

3.

With reference to the table, we see that

x;,

o.os

=

7 .82 and

xi,

0_10

=

6.25 and so

the observed frequencies do not differ significantly from the expected frequencies at either the 5% level of significance or at the 10% level. So. we accept the null hypothesis that the Poisson distribution is a good fit for the data.

�� 2

The values of X2 which are obtained using the formula X2 = L [ {O � E) ] are only approximate and, for the approximation to be good, the expected frequencies, E, should be at least 5. This can be achieved by combining two or more classes.

9.14 X

2

test for a normal distribution

Example 9

A survey of the rent paid per week by 300 tenants in a Melbourne suburb produced the following results:

Weekly rent <65 65-75 75-85 85-95 95-105 105-115 115-125 125-135 ($)

Frequency 0 15 24 35 50 41 18 17

>135

0

2

Use the X test to determine whether the rents paid in this suburb are normally distributed.

The hypotheses being tested are:

Ho: The rents are normally distributed withµ,

=

100 and a

=

16.35

HA: The rents are not normally distributed withµ,

=

100 and a

=

16.35.

The first step is to calculate the mean and standard deviation of the frequency distribution. Check that the mean is 100 and the standard deviation is 16.35. Using these as estimates of the mean and standard deviation of the population, construct a normal distribution with the same class intervals as the frequency distribution. The expected frequencies are shown in the following table:

Weekly

rent($) <65 65-75 75-85 85-95 95-105 105-115 115-125 125-135 [>135

(21)

Rent

0 <65 O] 15

65-75 15

75-85 24

85-95 35

95-105 50 105-115 41 115-125 18 125-135 1�]17

>135

E

0-E

2]12

10 3

23

40 -5

49 1

40 1

23 -5

1�] 12 5

(0 - E)2

E

0.75 0.04 0.63 0.02 0.02 1.09 2.08 x2 = 4.63

There are seven pairs of O and E values, i.e. 7 classes.

For n classes the number of degrees of freedom is n - 1. In this case, the number of degrees of freedom is 7 - 1 (or 6). With 6 degrees of freedom, x�. 0_05 = 12.6

and x�. 0_10 = 10.6.

Therefore we can accept the hypothesis that the rents are normally distributed with mean 100 and standard deviation 16.35.

Computer application

10 CLS 20 PRINT " 30 PRINT " 40 PRINT 50 PRINT

Computation of Chi-square"

60 PRINT " Program will provide for up to 1 00 frequencies" 70 DIM 0(100) :DIM E(100) :DIM D(100)

80 PRINT "Enter number of different frequencies": INPUT N 90 CSQR=0

1 00 · FOR I = 1 TO N

110 PRINT "enter observed frequency number" I : INPUT 0(1) 120 PRINT "enter expected frequency number" I : INPUT E(I) 130 D(I) = 0(1) - E(I)

140 CSQR = CSQR

+

D(l)112 / E(I)

150 NEXT I

160 PRINT "chisquare = "CSQR 190 END

The above program enables the value of X2 to be calculated from given observed and expected frequencies.

1 Explain the purpose of lines 80 to 160.

2 Use the program to calculate x2 for Examples 6 and 7.

(22)

9.15

x

2

test for a binomial distribution

Example 10

To test whether the distribution of the number of boys in families of 5 children is binomial withp

=

½,

a random sample of 320 families, each with 5 children, produced the following distribution:

Number of males 0 1 2 3 4 5

Number of families 12 42 92 108 46 20

Does this confirm or deny the null hypothesis that the distribution is binomial with

p

=

½ at the 5% level of significance?

The hypotheses being tested are:

Ho: The number of boys is binomially distributed with n

=

5 andp

=

½ HA: The number of boys is not binomially distributed with n

=

5 and

1 p

= 2·

Usingp

=

½,

q

=

½

and n

=

5, the expected frequencies are given by successive terms in the binomial expansion of 320

+

½)

5

.

The results are:

Number of males 0 1 2 3 4 5

Expected frequency 10 50 100 100 50 10

x2

=

(12 - 10)2 + (42 - 50)2 -1 (92 - 100)2 + (108 - 100)2 +

10 50 100 100

(46 - 50)2

+ (20 - 10)2

50 10

=

0.40 + 1.28 + 0.64 + 0.64 + 0.32 + 10 = 13.28

There are six classes and one restriction (the totals are the same) and so the number of degrees of freedom is v

=

6 - 1

=

5.

For five degrees of freedom,

x;,

0_05

=

11.1 and so we must reject the null

hypothesis at the 5% level of significance. However,

x;,

0_01

=

15.1, which makes the null hypothesis acceptable at the 1 OJo level of significance.

As an exercise, test for 'goodness of fit' using: a p

=

0.514 (See Chapter 1.)
(23)

Exercises 9c

1 A random digit generator produces, at random, the digits from Oto 9. The results of 200 trials produced the following frequency distribution:

Digit 0 1 2 3 4 5 6 7 8 9

Frequency 26 18 14 25 17 19 22 20 18 21

Use the X2 test to determine whether these frequencies differ significantly from the expected frequencies at the 50Jo level of significance.

2 Carry out the experiment of tossing a die 60 times, and use the X2 test and the 1 % level of significance to determine whether the die is fair. Repeat the experiment several times.

3 A coin was tossed 50 times and yielded 35 heads. Is this result consistent with the null hypothesis that the coin is biassed so that a head is expected to turn up on 600Jo of occasions? (Use the I% level of significance.)

4 A set of four coins was tossed 800 times and yielded the following results:

Number of heads 0 1 2 3 4

Frequency 68 182 318 156 76

Determine whether a binomial distribution is a good fit to these data on the assumption that the probability of a head is 0.5 in a single toss.

5 A coin is tossed 400 times.

a On the assumption that the coin is not biassed, use the X2 distribution to show that the number of heads turning up will lie between 174 and 226 at the I% level of significance.

b Between what limits will the number lie at the 5% level of significance?

6 From a standard pack of 52 playing cards, a card was drawn and its suit was noted.

The card was replaced in the pack which was then well shuffled. This selection and replacement process was repeated 80 times; resulting in the following frequency distribution:

Suit Hearts Diamonds Clubs Spades

Frequency 24 17 16 23

Use the x2 distribution to determine whether these differences in frequencies are of significance at the 5% level.

7 It is alleged that about 25% of children having one parent of blood type X and the other

parent of blood type Y, will have blood type X; about 50% will have blood type XY

and 250Jo blood type Y. Out of a sample of 200 such children, 28% were found to have blood type X, 45% to have blood type XY and 27% to have blood type Y. Calculate

the value of x2 and determine whether these percentages agree with the theory at the

5% level of significance.

(24)

9 In a random sample of 500 housewives, 40% stated that they use Snow White washing powder. The manufacturers advertise that 500Jo of all housewives use Snow White. At the 50Jo level of significance, is their claim justified?

10 The number of particles emitted from a radioactive source was counted on a Geiger counter and, over a 100-minute period, the number of particles emitted per minute was recorded as follows:

Number of particles/minute 0 1 2 3 4 5 6 �7

Number of minutes 6 14 19 26 17 8 8 2

Fit a Poisson distribution to these data and use the x2 test to determine 'goodness of

fit' at the 1 OJo level of significance. (Combine the last two classes.)

11 The number of surface defects on specimens of steel was thought to be a Poisson variable. To test this hypothesis, 150 specimens were examined and the results were as follows:

Number of defects/specimen 0 1 2 3 4 5 6

Number of specimens 25 28 50 30 6 8 3

Do the data support the hypothesis at the 5% level of significance? (Combine the last two classes.)

12 A manufacturer of electric lightglobes claims that 60-watt globes have an average life of 1200 hours and a standard deviation of 200 hours, and that their lifetimes are normally distributed. A test on 400 randomly selected globes yielded the following results:

Length of life (hours) 600-800 800-1000 1000-1200 1200-1400 1400-1600 1600-1800

Number of globes 16 48 122 146 50 18

Do these results confirm the manufacturer's claim at the 5% level of significance? 13 Two dice are each tossed 120 times and the numbers uppermost are as shown in the

following table:

Number uppermost 1 2 3 4 5 6 Total

Frequency: Die 1 27 23 17 14 26 13 120

Frequency: Die 2 16 14 25 25 12 28 120

Apply the x2 test to determine if either of the dice is biassed at the 5% level of

(25)

14 A small business has five employees. The following table shows the number of days throughout the year on which they were late for work.

Employee A B C D E

Number of days late 28 16 20 8 14

Do these figures indicate an inconsistency in employee behaviour? (Use the 5% level of significance).

Note:

Making the level of significance more stringent (1 OJo instead of 5%) makes it harder to reject the null hypothesis, i.e. we may sometimes miss out on identifying a real difference.

The other risk we :run is of claiming a real difference exists when none is present. This can happen if the level of significance is not made demanding enough.

9.16 Contingency tables

Example 11

From a sample of the deaths of 500 smokers, of whom 300 were classified as heavy smokers and 200 as light smokers, 95 heavy smokers and 45 light smokers died from lung cancer and the remainder died from other causes.

Death from:

Cancer Other causes Total

Heavy smokers 95 205 300

Light smokers 45 155 200

Total

=

140 Total

=

360 500

(These figures are not taken from any official source). Do these figures suggest that there is a relationship between smoking and death from lung cancer?

The hypotheses being tested are:

Ho: There is no relationship between heaviness of smoking and death from lung cancer.

HA: There is a relationship.

The table above, consisting of two rows and two columns, is a 2 x 2 contingency table.

To derive the expected frequencies, we observe that 140 out of 500, i.e. 28%, died from lung cancer. If there was no relationship between smoking and lung cancer, we would expect 28% of the 300 heavy smokers to die from lung cancer and 28% of the 200 light smokers to die from lung cancer, i.e. 84 heavy smokers and 56 light smokers.

(26)

The observed and expected frequencies can be presented as follows:

0 E

95 84

45 56

205 216

155 144

Total 500 500

2 = (95 - 84)2 + (45 - 56)2 + (205 - 216)2 + (155 - 144)2

X 84 56 216 144

= 5.00

With one degree of freedom, x�.05 = 3.84 and x�_01 = 6.63, we accept the

hypothesis that there is a relationship between the extent of smoking and death from lung cancer at the 1 OJo level of significance but not at the 50Jo level. The contingency table in this example is presented as a 2 x 2 matrix (two rows and two columns). The rows refer to the type of smoker, the columns refer to the type of death.

The table is called a 2 x 2 contingency table.

The 500 people are classified in two directions on two variables: a their smoking habits according to whether they are heavy or light

b their manner of death according to whether it is by lung cancer or other causes. In a 2 X 2 contingency table, there are 2 x 2 = 4 cells for which there are four observed frequencies. In a 3 x 2 contingency table, there are 3 x 2 = 6 cells for which there are

six observed frequencies. In general, an

m

x

n

contingency table has

m

rows and

n

columns. The number of degrees of freedom is (m - 1) x (n - 1). So, for a 2 x 2 contingency table, there is one degree of freedom. Once one of the observed frequencies is known, the other three observed frequencies can be deduced from the totals. For a 3 X 2 contingency table, there are two degrees of freedom.

In the next example, we have a 3 x 2 contingency table in which we classify the students according to year at school and performance in a test.

Example 12

A teacher wished to determine whether the performance in a problem solving test is

independent of the students' year at school. The teacher selected 120 students, 40 from each of Years 8, 9 and 10, and graded their performance in a test as A or Bas shown in the following table:

Grade awarded

Year A B Total

8 22 18 40

9 26 14 40

10 27 13 40

Total 75 45 120

(27)

The hypotheses being tested are:

Ho: There is no relationship between grades awarded and years at school. HA: There is a relationship.

To derive the expected frequencies, we observe that 75 out of 120, i.e.

i,

of the students scored an A and so, from the 40 students in each of Years 8, 9 and 10,

we would expect

i

of 40 = 25 t� receive an A and 15 to receive a B. The observed

and expected frequencies are as shown in the following table:

0

E

0-E

{O -£)

E

2

Year 8 A 22 25 -3 0.36

Year 8 B 18 15 3 0.60

Year9A 26 25 1 0.04

Year 9 B 14 15 -1 0.07

Year lOA 27 25 2 0. 16

Year 10 B 13 15 -2 0.27

Total 120 120 x2 =1.50

The table of observed frequencies is a 3 x 2 contingency table containing six cells and there are two degrees of freedom.

With two degrees of freedom, the tables show that x�_05 = 5.99 and x�.01 = 9 .21.

So, we can accept the hypothesis that performance is independent of the students' year at school at both the 50Jo and 1 O'/o level of significance.

Example 13

For random samples of 200 people contacted in each of six States, the percentages who favoured the setting aside of a certain region for a national park were:

660Jo 540Jo 600Jo 480Jo 640Jo 600Jo

Are the people of the six States equally favourable to the setting aside of the region for a national park? Use the 0.05 level of significance.

It is possible to test for equality of proportions or percentages by converting them to a contingency table:

State

A B C D E F

Favour 132 108 120 96 128 120

Non-favour 68 92 80 104 72 80

The hypotheses to be tested are:

Ho: People of the six States are equally in favour.

(28)

0

E

0-E

(0-£)2

E

AF

132 100 32 10.24

BF

108 100 8 0.64

CF

120 100 20 4.00

DF

96 100 -4 0.16

EF

128 100 28 7.84

FF

120 100 20 4.00

ANF

68 100 -32 10.24

BNF

92 100 -8 0.64

CNF

80 100 -20 4.00

DNF

104 100 4 0.16

ENF

72 100 -28 7.84

FNF

80 100 -20 4.00

x2

=

53.76

From tables, for (6-1)(2-1)

=

5 degrees of freedom, at the 0.05 significance level,

x;

=

11.1. So, the null hypothesis is rejected and it is concluded that the people of different States are not equally in favour to setting aside the region as a national park.

Exercises 9d

1 An opinion poll was conducted among 500 females and 500 males to seek their opinion on a certain social issue. The responses were as follows:

Agree Disagree

Females 230 270

Males 310 190

Do these figures suggest that there is no relationship between the opinion expressed and the gender of the person at the 5% level of significance?

2 A random sample of 1000 people was selected and tested for colour-blindness. The survey produced the following results:

Colour blind Not colour Total blind

Male 80 320 400

Female 60 540 600

Total 140 860 1000

(29)

3 A survey was conducted to determine a two-party preference among voters aged above 25 years and below 25 years. It revealed the following results:

Under25 Over 25 Tota/

Labor 240 210 450

Liberal 260 290 550

Totals 500 500 1000

(These figures are fictitious.)

Do these figures support the hypothesis, at the 50Jo level of significance, that there is no relationship between party preference and age?

4 A survey among university students was conducted to determine whether male and female students are represented equally in the three socio-economic classes. The results of the survey revealed the following:

Upper Middle Lower Total

Male 100 140 60 300

Female 80 100 20 200

Totals 180 240 80 500

a State a suitable hypothesis related to these data.

b Can we accept this null hypothesis at the 50Jo level of significance?

5 In an investigation of their preference for colour, 200 children were given a choice between two identical objects, one red, the other yellow. The results of their choice were as follows:

Red Yellow Total

Boys 85 35 120

Girls 45 35 80

Total 130 70 200

(30)

6 The editor of The Press wished to determine whether age of readers was related to choice of two available newspapers. A poll of 200 people from each of three age groups

was taken to determine whether they read The Press or its competitor, The Moon. The

results were:

Age group The Press The Moon Total

Less than 30 85 115 200

30 to 50 98 102 200

Over 50 87 113 200

Total 270 330 600

Test the null hypothesis that choice of newspaper and age group are independent at the 5% level of significance.

7 A certain medical operation is usually performed with a general anaesthetic but is sometimes performed with a local anaesthetic. The following table from a hospital's records shows the number of successes and failures.

Successes Failures Total

General anaesthetic 360 50 410

Local anaesthetic 70 20 90

Total 430 70 500

At the 5% level of significance, is success independent of the type of anaesthetic? 8 On several occasions throughout the year a sales representative leaves her Melbourne

office at 9 a.m. to travel to Albury. She notes the number of occasions on which she

reaches Albury before 12 noon according to which of three routes, A, B or C, she takes.

Her findings are shown in the following table:

A B C Total

Before noon 55 55 50 160

After noon 10 20 10 40

Total 65 75 60 200

Do these figures support the null hypothesis that the time of arrival is independent of the route taken? Use the 1 OJo level of significance.

9 A poll indicates that, for random samples of 400 for each group, the percentage of people who are irritated by filmgoers who talk during the show are:

18-24 years 76%

25-39 years 63%

40-54 years 64%

55 and over 59%

(31)

10 In an investigation to discover whether there is a relationship between heart disease and income, a researcher classified 250 men into five income levels with 50 men at each level. She found that the proportions in each group which had suffered heart attacks were:

0.10 0.14 0.24 0.12 0.20

Test the hypothesis, that for the whole population, the proportions of men from the five income levels who suffer from heart attacks are equal, against the alternative that they are not, at the 0.01 significance level.

[:J

9.17 Newspa11er poll

Choose a set of data from a newspaper poll which divides interviewers into groups, e.g. male and female, age groups, voting preference groups. Suggest a null

hypothesis for such situations and test them at the 5% level, using a x2 test.

9.18 Die-tossing program

The program below simulates the random tossing of a die. The print-out on the next page shows the results from one sample run of 100 tosses. Both the number of t�sses (N) and the number of faces on the die (F) can be varied to generate data quickly for simulated experiments for comparison with theoretical distributions.

To provide output on a computer screen rather than a printer, the print statements in lines 20, 30, 70, 80, 120, 1 30, 190,210,220,230, 240,260,280 should be altered from LPRINT to PRINT.

10 REM Die Tossing

20 LPRINT "Program to simulate tosses of a die" 30 LPRINT " --- " 40 PRINT "Enter number of faces on die - F" : INPUT F 50 PRINT "Enter number of tosses - N" : INPUT N 60 RANDOMIZE

70 LPRINT " Outcomes" 80 LPRINT "--- " 90 DIM N0(500)

1 00 FOR I = 1 TO N

110 IF (1-1) / 20< >INT((l-1) / 20) THEN 140 120 LPRINT

130 LPRINT

140 THROW= INT(RND*F) + 1 1 50 FOR J = 1 TO F

160 IF THROW<> J THEN 180 1 70 NO (J) = NO(J) + 1

180 NEXT J

190 LPRINT THROW; 200 NEXT I

210 LPRINT 220 LPRINT

230 LPRINT " Distribution" 240 LPRINT " --- " 250 FOR J = 1 TO F

260 LPRINT "Number of " J" s = "NO(J) 270 NEXT J

(32)

Program to simulate tosses of a die

---Outcomes

---4 2 3 5 4 5 6

6 6 5 3 1 2 3 2 6 2 1 4 5 2 4 1

6 4 6 4 2 5 1

4 5 6 5 3 6 3 3

Distribution

Number of occurrences of 1 = 20 Number of occurrences of 2 = 13 Number of occurrences of 3 = 1 4 Number of occurrences of 4 = 1 9 Number of occurrences of 5 = 15 Number of occurrences of 6 = 1 9 Number of tosses = 1 00

3 3 4 3

1 6 4 1

3 2

4 5 2 3 1 5 1 6 2 5 5 4 4 5 3 1 6 5 2

1 1 4 4 4 6 6 6 6

6 1 2 3 6 1 6 5 6

(33)

9.19

Tables

The chi-square distribution

with .,, degrees of freedom

[Probability (p) given by shaded area]

x:

V )(� 005 )(�_01 x�.025 )(� 05 )(� 10 )(� 26 )(�_50 X�,75 xtuo )(�_95 x�.m )(�_99 )(�_995

1 7.88 6.63 5.02 3.b4 2.71 1.32 0.455 0.102 0.0158 0.0039 0.0010 0.0002 0.0000 2 10.6 9.21 7.38 5.99 4.61 2.77 1.39 0.575 0.211 0.103 0.0506 0.0201 0.0100

3 12.8 11.3 9.35 7.81 6.25 4.11 2.37 1.21 0.584 0.352 0.216 0.115 0.072 4 14.9 13.3 11.1 9.49 7.78 5.39 3.36 1.92 1.06 0.711 0.484 0.297 0.207 5 16.7 15.1 12.8 11.1 9.24 6.63 4.35 2.67 1.61 1.15 0.831 0.554 0.412 6 18.5 16.8 14.4 12.6 10.6 7.84 5.35 3.45 2.20 1.64 1.24 0.872 0.676

7 20.3 18.5 16.0 14.1 12.0 9.04 6.35 4.25 2.83 2.17 1.69 1.24 0.989 8 22.0 20.1 17.5 15.5 13.4 10.2 7.34 5.07 3.49 2.73 2.18 1.65 1.34 9 23.6 21.7 19.0 16.9 14.7 11.4 8.34 5.90 4.17 3.33 2.70 2.09 1.73 10 25.2 23.2 20.5 18.3 16.0 12.5 9.34 6.74 4.87 3.94 3.25 2.56 2.16 11 26.8 24.7 21.9 19.7 17.3 13.7 10.3 7.58 5.58 4.57 3.82 3.05 2.60 12 28.3 26.2 23.3 21.0 18.5 14.8 11.3 8.44 6.30 5.23 4.40 3.57 3.07 13 29.8 27.7 24.7 22.4 19.8 16.0 12.3 9.30 7.04 5.89 5.01 4.11 3.57 14 31.3 29.1 26.1 23.7 21.1 17.1 13.3 10.2 7.79 6.57 5.63 4.66 4.07 15 32.8 30.6 27.5 25.0 22.3 18.2 14.3 11.0 8.55 7.26 6.26 5.23 4.60 16 34.3 32.0 28.8 26.3 23.5 19.4 15.3 11.9 9.31 7.96 6.91 5.81 5.14

(34)

References

Related documents

The P-value tells us that if the null hypothesis were true, a proportion of of samples would fall at least as far as the sample data from the alternative

The four cysteine residues in the second extracellular loop of the human adenosine A2B receptor: role in ligand binding and receptor function.. Homology

The AMD Phenom II X6 processor is the most advanced AMD desktop processor and features innovative AMD Turbo CORE technology to adjust to the dynamic needs of performance users. •

Gambling houses are interested in statistics that would detect such deviations as soon as possible with the smallest probabil- ity of false alarms.. The reasons why “quality control”

The null hypothesis is therefore rejected and the alternative hypothesis which states that there is a significant difference between the role of the counseling

Hence the null hypothesis that there is no significant association between performance and personal branding of CEO‘S is rejected and alternative hypothesis that there is

For the next two questions: An observational study found a statistically significant relationship between regular consumption of tomato products (yes, no) and development of

This agreement is subject to all exhibitors, its agents and employees who shall use and occupy the exhibit space pursuant to all terms and conditions of the agreement