Presentation is loading. Please wait.

Presentation is loading. Please wait.

Goodness of Fit xΒ² -Test

Similar presentations


Presentation on theme: "Goodness of Fit xΒ² -Test"β€” Presentation transcript:

1 Goodness of Fit xΒ² -Test
İST 252 EMRE KAÇMAZ B4 /

2 Goodness of Fit πœ’Β² -Test
To test for goodness of fit means that we wish to test that a certain function F(x) is the distribution function of a distribution from which we have a sample x1,…..xn . Then we test whether the sample distribution function 𝐹 (x) defined by fits F(x) β€˜sufficiently well.’

3 Goodness of Fit xΒ² -Test
If this is so, we shall accept the hypothesis that F(x) is the distribution function of the population; if not, we shall reject the hypothesis. This test is of considerable practical importance, and it differs in character from the tests for parameters (ΞΌ, σ², etc.) considered so far. To test in that fashion, we have to know how much 𝐹 (x) can differ from F(x) if the hypothesis is true.

4 Goodness of Fit xΒ² -Test
Hence we must first introduce a quantity that measures the deviation of 𝐹 (x) from F(x), and we must know the probability distribution of thi quantity under the assumption that the hypothesis is true. Then we proceed as follows. We determine a number c such that, if the hypothesis is true, a deviation greater than c has a small preassigned probability.

5 Goodness of Fit xΒ² -Test
If, nevertheless, a deviation greater than c occurs, we have reason to doubt that the hypothesis is true and we reject it. On the other hand, if the deviation does not exceed c, so that 𝐹 (x) approximates F(x) sufficiently well, we accept the hypothesis. Of course, if we accept the hypothesis, this means that we have insufficient evidence to reject it, and this does not exclude the possibility that there are other functions that would not be rejected in the test. In this respect the situation is quite similar to that in Sec 25.4

6 Goodness of Fit xΒ² -Test
Table 25.7 shows a test of that type, which was introduced by R.A.Fisher. This test is justified by the fact that if the hypothesis is true, than x0Β² is an observed value of random variable whose distribution with K-1 degrees of freedom (or K – r – 1 degrees of freedom if r parameters are estimated) as n approaches infinity.

7 Goodness of Fit xΒ² -Test
The requirement that at least five sample values lie in each interval Table 25.7 results from the fact that for finite n that random variable has only approximately a chi-square distribution. If the sample is so small that the requirement cannot be satisfied, one may continue with the test, but then use the result with caution.

8 Table 25.7 Chi-square Test for the Hypothesis That F(x) is the Distribution Function of a Population from Which a Sample 𝒙 𝟏 ,…………., 𝒙 𝒏 is Taken Step 1: Subdivide the x-axis into K intervals Ξ™ 1 , Ξ™ 2 ,….., π›ͺ 𝐾 such that each interval contains at least 5 values of the given sample 𝒙 𝟏 ,…………., 𝒙 𝒏 . Determine the number 𝑏 𝑗 of sample values in the interval Ξ™ 𝑗 , where j = 1,…..,K. If a sample value lies at a common boundary ppoint of two intervals, add 0.5 to each of the two corresponding 𝑏 𝑗 .

9 Table 25.7 Step 2: Using F(x), compute the probability 𝑝 𝑗 that the random variable X under consideration assumes any value in the interval Ξ™ 𝑗 , where j = 1,……,K. Compute 𝑒 𝑗 = n 𝑝 𝑗 (This is the number of sample values theoretically expected in Ξ™ 𝑗 if the hypothesis is true.) Step 3 : Compute the deviation

10 Table 25.7 Step 4 : Choose a significance level (5%, 1%, or the like).
Step 5 : Determine the solution c of the equation from the table of the chi-square distribution with K – 1 degrees of freedom. If r parameters of F(x) are unknown and their maximum likelihood estimates are used, then use K – r – 1 degrees of freedom (instead of K – 1). If π‘₯ 0 Β² ≦ c, accept the hypothesis. If π‘₯ 0 Β²> c, reject the hypothesis.

11 Table 25.8

12 Example 1 Test of Normality
Test whether the population from which the sample in table was taken is normal.

13 Solution Table 25.8 shows the values (column by column) in the order obtained in the experiment. Table 25.9 gives the frequency distribution and Fig. 542 the histogram. It is hard to guess the outcome of the test – does the histogram resemble a normal density curve sufficiently well or not?

14 Solution The maximum likelihood estimates for πœ‡ and 𝜎² are πœ‡ = π‘₯ = and 𝜎 Β² = The computation in Table yields π‘₯ 0 Β² = It is very interesting that the interval 375….385 contributes over 50% of π‘₯ 0 Β². From the histogram we see that the corresponding frequency looks much too small. The second largest contribution comes from 395….405, and the histogram shows that the frequency seems somewhat too large, which is perhaps not obvious from inspection.

15 Table 25.9

16 Figure 542 We choose 𝛼 = 5%. Since K = 10 and we estimated r = 2 parameters we have to use with K – r – 1 = 7 degrees of freedom. We find c = as the solution of P(xΒ² ≦𝑐) = 95%. Since π‘₯ 0 Β² < c, we accept the hypothesis that the population is normal.

17 Figure 542

18 Table 25.10


Download ppt "Goodness of Fit xΒ² -Test"

Similar presentations


Ads by Google