blacksacademy symbol
thumbnail


Chi squared test for goodness of fit


DOWNLOAD
FREE



thumbnail

Modelling of theoretical distributions to given data and the Chi squared test for goodness of fit


Equations are omitted for technical reasons - download the original pdf

We are concerned here with testing a hypothesis that a given population follows a particular distribution. Up to now we have always assumed or been told that a particular variable follows a particular distribution. In this section we show how to test that assumption. Thus we are testing a hypothesis that a variable X can be modelled as following a particular probability distribution. In order to do this, however, we need to be able to answer the question&: what frequencies would we expect from X if X was distributed in the way described? We need to be able to construct a table of expected probabilities and frequencies. This involves no new theory and is best illustrated by example. Example (1) A discrete probability distribution A ten&-sided die is thought to be weighted in a way that makes it biased. The probability of throwing any even number is thought to be equal. For the odd numbers the probability of throwing a 1 is equal to the probability of throwing an even numbes the probability of throwing a 9 is five times that of throwing a 1 the probabilities of throwing a1, 3, 5, 7 and 9 are in arithmetic progression The die will be thrown 160 times; find the expected frequencies. Answer [Equation goes here &- download the original to see it.] [Equation goes here &- download the original to see it.] [Table goes here &- download the original to see it.] [Equation goes here &- download the original to see it.] This will enable us to generate the probability distribution. Multiplying each probability by 20 will yield the expected frequencies.[Table goes here &- download the original to see it.] We will illustrate how expected frequencies can be obtained for other distributions later, but we shall first proceed to illustrate the testing of a hypothesis about a distribution by continuing this example. Example (1) cont. On throwing the die 160 times the following frequencies were observed. [Table goes here &- download the original to see it.] Test the hypothesis at the 5% level that the die is biased as described. The test will be conducted by comparing the expected frequencies that we have just calculated with the observed frequencies just stated. We designate the observed frequencies O and the expected frequencies E. Then the test statistic is [Equation goes here &- download the original to see it.] We square the difference between the observed and expected frequency and divide the result by the expected frequency; then we sum the whole lot.
Contents of
Chi squared test for goodness of fit

1 Medians, quartiles and percentiles.
2 Modelling of theoretical distributions to given data and the Chi squared test for goodness of fit
3 Approximation by the chi squared test
4 Example of modelling using the chi squared test for goodness of fit
5 Cumulative distribution function.

Related articles: (1) Hypothesis testing, (2) Chi squared test for goodness of fit