The **Goodness of Fit** test is used to check the sample data whether it fits from a distribution of a population. Population may have normal distribution or Weibull distribution. In simple words, it signifies that sample data represents the data correctly that we are expecting to find from actual population. Following tests are generally used by statisticians:

- Chi-square
- Kolmogorov-Smirnov
- Anderson-Darling
- Shipiro-Wilk

## Chi-square Test

The chi-square test is the most commonly used to test the goodness of fit tests and is used for discrete distributions like the binomial distribution and the Poisson distribution, whereas The Kolmogorov-Smirnov and Anderson-Darling goodness of fit tests are used for continuous distributions.

## Formula

Where −

- ${O_i}$ = observed value of i th level of variable.
- ${E_i}$ = expected value of i th level of variable.
- ${X^2}$ = chi-squared random variable.

## Example

A toy company builts football player toys. It claims that 30% of the cards are mid-fielders, 60% defenders, and 10% are forwards. Considering a random sample of 100 toys has 50 mid-fielders, 45 defenders, and 5 forwards. Given 0.05 level of significance, can you justify company’s claim?

**Solution:**

### Determine Hypotheses

**Null hypothesis $ H_0 $**– The proportion of mid-fielders, defenders, and forwards is 30%, 60% and 10%, respectively.**Alternative hypothesis $ H_1 $**– At least one of the proportions in the null hypothesis is false.

### Determine Degree of Freedom

The degrees of freedom, DF is equal to the number of levels (k) of the categorical variable minus 1: DF = k – 1. Here levels are 3. Thus

\, = 3 -1 = 2 }$

### Determine chi-square test statistic

\, = [\frac{(50-30)^2}{30}] + [\frac{(45-60)^2}{60}] + [\frac{(5-10)^2}{10}] \\[7pt]

\, = \frac{400}{30} + \frac{225}{60} + \frac{25}{10} \\[7pt]

\, = 13.33 + 3.75 + 2.50 \\[7pt]

\, = 19.58 }$

### Determine p-value

P-value is the probability that a chi-square statistic,$ X^2 $ having 2 degrees of freedom is more extreme than 19.58. Use the Chi-Square Distribution Calculator to find $ { P(X^2 \gt 19.58) = 0.0001 } $.

### Interpret results

As the P-value (0.0001) is quite less than the significance level (0.05), the null hypothesis can not be accepted. Thus company claim is invalid.

Table of Contents

1.statistics adjusted rsquared

2.statistics analysis of variance

4.statistics arithmetic median

8.statistics best point estimation

9.statistics beta distribution

10.statistics binomial distribution

11.statistics blackscholes model

13.statistics central limit theorem

14.statistics chebyshevs theorem

15.statistics chisquared distribution

16.statistics chi squared table

17.statistics circular permutation

18.statistics cluster sampling

19.statistics cohens kappa coefficient

21.statistics combination with replacement

23.statistics continuous uniform distribution

24.statistics cumulative frequency

25.statistics coefficient of variation

26.statistics correlation coefficient

27.statistics cumulative plots

28.statistics cumulative poisson distribution

30.statistics data collection questionaire designing

31.statistics data collection observation

32.statistics data collection case study method

34.statistics deciles statistics

36.statistics exponential distribution

40.statistics frequency distribution

41.statistics gamma distribution

43.statistics geometric probability distribution

46.statistics gumbel distribution

49.statistics harmonic resonance frequency

51.statistics hypergeometric distribution

52.statistics hypothesis testing

53.statistics interval estimation

54.statistics inverse gamma distribution

55.statistics kolmogorov smirnov test

57.statistics laplace distribution

58.statistics linear regression

59.statistics log gamma distribution

60.statistics logistic regression

63.statistics means difference

64.statistics multinomial distribution

65.statistics negative binomial distribution

66.statistics normal distribution

67.statistics odd and even permutation

68.statistics one proportion z test

69.statistics outlier function

71.statistics permutation with replacement

73.statistics poisson distribution

74.statistics pooled variance r

75.statistics power calculator

77.statistics probability additive theorem

78.statistics probability multiplicative theorem

79.statistics probability bayes theorem

80.statistics probability density function

81.statistics process capability cp amp process performance pp

83.statistics quadratic regression equation

84.statistics qualitative data vs quantitative data

85.statistics quartile deviation

86.statistics range rule of thumb

87.statistics rayleigh distribution

88.statistics regression intercept confidence interval

89.statistics relative standard deviation

90.statistics reliability coefficient

91.statistics required sample size

92.statistics residual analysis

93.statistics residual sum of squares

94.statistics root mean square

96.statistics sampling methods

98.statistics shannon wiener diversity index

99.statistics signal to noise ratio

100.statistics simple random sampling

102.statistics standard deviation

103.statistics standard error se

104.statistics standard normal table

105.statistics statistical significance

108.statistics stem and leaf plot

109.statistics stratified sampling

112.statistics tdistribution table

113.statistics ti 83 exponential regression

114.statistics transformations

116.statistics type i amp ii errors

119.statistics weak law of large numbers