#### Goodness of fit 0 This test is used to decide whether there is any difference between the observed (experimental) value and the expected.

download report#### Transcript Goodness of fit 0 This test is used to decide whether there is any difference between the observed (experimental) value and the expected.

### Goodness of fit

*0*

This test is used to decide whether there is any difference between the observed (experimental) value and the expected (theoretical) value.

### Goodness of Fit

### Free from Assumptions

*0*

Chi square goodness of fit test depends only on the set of observed and expected frequencies and degrees of freedom. This test does not need any assumption regarding distribution of the parent population from which the samples are taken.

*0*

Since this test does not involve any population parameters or characteristics, it is termed as non parametric sample size independent and can be used for any sample size.

or distribution free tests. This test is also

### It is all about expectations

*O*

measurement *i*

*E i i*

= an observed frequency (i.e. count) for = an expected (theoretical) frequency for measurement *i*, asserted by the null hypothesis.

### Expected Value

*0*

*F *= the cumulative Distribution function for the distribution being tested.

*0 Y u*

= the upper limit for class *I*

*0*

(maximum possible observations for any category)

*0 Y l*

= the lower limit for class *I*

*0*

(minumum possible observations for any category)

*0*

*N *= the sample size

### Hypothesis testing

**Choose a level of alpha – usually 0.05**

**This implies a 95% level of comfort that the observation is correct.**

### Example

The number of cubs delivered to a population of bears in the wild is tested to see if there is no difference in probability of twins. (N = 50 females)

**Number of cubs**

Observed Expected

**0**

1 12.5

**1**

5 12.5

**2**

35 12.5

**3**

9 12.5

**Degrees of Freedom = Number of groups – 1 df = 4 – 1 = 3**

### CHI-SQUARE DISTRIBUTION TABLE

### Decision Rule

*0*

Based on the alpha and the degrees of freedom, look up the value in the table.

*0*

For our example of alpha=.05 and df=3

*0*

**If chi square is greater than 7.82 then reject the **

**null hypothesis **that bears normally birth twins.

**Number of cubs**

Observed Expected

**0**

### Calculate the value

1 12.5

**1**

5 12.5

**2**

35 12.5

**3**

9 12.5

Chi-square = (1-12.5) 2 /12.5 + (5-12.5) 2 /12.5 + (35-12.5) 2 /12.5 + (9 12.5) 2 /12.5 = 10.58 + 4.5 + 40.5 + 0.98 = 56.56

**Since 56.56 > 7.82 we reject the null hypothesis that the number of bear cubs is equally possible for 0-3 cubs**

### Interpret the result

*0*

Since we rejected the null hypothesis, what conclusions (inferences) can we come to?