how do you do the goodness of fit test 
the goodness of fit test consists of different testing methods the goal of the test will help determine which method to use for example if the goal is to test normality on a relatively small sample the shapiro wilk test may be suitable if wanting to determine whether a sample came from a specific distribution within a population the kolmogorov smirnov test will be used each test uses its own unique formula however they have commonalities such as a null hypothesis and level of significance the bottom linegoodness of fit tests determine how well sample data fit what is expected of a population from the sample data an observed value is gathered and compared to the calculated expected value using a discrepancy measure there are different goodness of fit hypothesis tests available depending on what outcome you re seeking choosing the right goodness of fit test largely depends on what you want to know about a sample and how large the sample is for example if wanting to know if observed values for categorical data match the expected values for categorical data use chi square if wanting to know if a small sample follows a normal distribution the shapiro wilk test might be advantageous there are many tests available to determine goodness of fit 