Questions tagged [goodness-of-fit]

Goodness of fit tests indicate whether or not it is reasonable to assume that a random sample comes from a specific distribution.

"They are a form of hypothesis testing where the null and alternative hypotheses are:

H0: Sample data come from the stated distribution
HA: Sample data do not come from the stated distribution

These tests are sometimes called *omnibus tests."

Reference:

Ricci, V. (2005). Fitting distributions with R. page 16.


Tag Usage

Questions on should be about implementation and programming problems, not about the statistical or theoretical properties of the technique.
Consider whether your question might be better suited to Cross Validated, the StackExchange site for statistics, machine learning and data analysis.

123 questions
0
votes
0 answers

RMSE calculation after binning using matlab

Hi I want to calculate the RMSE but it seems that I am making some logical mistake.This is my given below code : topEdge = 20; % upper limit botEdge = 5; % lower limit numBins = 40; % define number of bins b_vector = speed; a_vector =…
Ankita
  • 485
  • 5
  • 18
0
votes
2 answers

R How to generate a vector of probabilities normally distributed to be used at chisq.test

I have a vector of 30 samples I want to test the hypothesis of the sample being from a population which is normally distributed. > N.concentration [1] 0.164 0.045 0.069 0.100 0.050 0.080 0.043 0.036 0.057 0.154 0.133 0.193 [13] 0.129 0.121 0.081…
rvbarreto
  • 683
  • 9
  • 24
0
votes
1 answer

How to calculate simulated values while plotting discrepancy plot for goodness of fit?

I am trying to make the discrepancy plot for testing goodness-of-fit after obtaining best fit values by MCMC using pymc. My code goes as: import pymc import numpy as np import matplotlib.pyplot as plt, seaborn as sns # Seeding…
Silentrash
  • 45
  • 5
0
votes
0 answers

Goodness of fit for normal distribution

I am trying to estimate goodness of fit for normal distribution of error using chi-squares based criterion. Specifically, I have a sample and it's estimate. From there I calculate the errors in approximation. I now use these errors as new, assumed…
0
votes
1 answer

How do I retrieve the results of a chi-squared goodness-of-fit test using goodfit?

I'm trying to write a piece of software in R that finds the most fitting distribution family to a set of data by performing the chi-squared test on the data (with regards to said family) and finding the best chi-squared value. However, when using…
Martin
  • 277
  • 2
  • 5
  • 17
0
votes
0 answers

Computing (adjusted) R^2 from a given curve and data points

I would like to assess the fit a given curve with some data points by computing the (idelly, adjusted) R^2, using Matlab. All the tutorials I could find online explain how to do this when the curve has been obtained directly from the data set, but…
sdnnds
  • 101
  • 1
0
votes
1 answer

goodness of fit in pymc and plotting discrepancies

I'm using PYMC 2.3.4. I found terrific. Now I would like to do some goodness of the fit and plot discrpancies how shown in section 7.3 of the documentation (https://pymc-devs.github.io/pymc/modelchecking.html) In the documentation they say that you…
0
votes
2 answers

I need to find the distribution of data, which is from a retail chain network. No distribution fits the data

I need to find the distribution of data, which is from a retail chain network( demand of product across all stores). I tried to fit distribution using EasyFit (which has 82 distribution to check the best distributions) but no distribution fits the…
0
votes
1 answer

Poisson Kolmogorov Smirnov ties warning

I am trying to run a KS test on a vector to check if its follows a Poisson distribution require("MASS") Data <- rpois(100000, 20) distFit<-fitdistr(Data,"Poisson") ks.test(Data,"ppois",lambda=distFit$estimate) unfortunately I get the following…
ulrich
  • 3,547
  • 5
  • 35
  • 49
0
votes
1 answer

p = NaN for goodness of fit matlab

Hi have a set of observations obs = https://drive.google.com/file/d/0B3vXKJ_zYaCJVlhqd3FJT0xtWFk/view?usp=sharing I would like to prove that they come from a Gamma distributions. To do that I: %estimate parameters gamma distribution …
gabboshow
  • 5,359
  • 12
  • 48
  • 98
0
votes
0 answers

R - Fit many distributions to sample, visualize, and sort by g.o.f. test

Is there any package in R that allows fitting many pdfs at the same time to some sample data, plots all fits and the sample histogram, and then allows sorting the fittings by some gof criteria like Kolmogorov-Smirnov, Anderson-Darling, X2, ...?…
Oliver Amundsen
  • 1,491
  • 2
  • 21
  • 40
0
votes
1 answer

Chi squared test

I have written code in MATLAB for a Chi-Square test. I wish to obtain P-values as 0.897 or 0.287 and so on, but my results are too small. Below is my code: pd = fitdist(sample, 'weibull'); [h,p,st] = chi2gof(sample,'CDF',pd) I've also tried using…
fredd
  • 39
  • 1
  • 2
  • 8
0
votes
1 answer

Goodness of fit - Comparing few data points with Simulated Equation Curves

I have a set of reference data points to which I want to fit a sigmoidal curve. I can use the curve fitting tool of MATLAB to do this but I have a custom equation to fit to the data. The equation has 4-5 variables which I want to vary and then test…
Darshan
  • 38
  • 5
0
votes
0 answers

How should I be applying a Poisson fit to this dataset?

I followed this document trying to fit a set of frequency data to Poisson distribution in R, but goodfit throws many warnings: >library(vcd) >freq [1] 71 9 1 7 27 158 1 6 1 28 1 7 33 10 2 14 3 5 17 73 8 248 [23] 6…
Zebra Propulsion Lab
  • 1,736
  • 1
  • 17
  • 28
0
votes
1 answer

Chi square goodness of fit without Yates correction

I want to conduct a theoretical chi square goodness of fit test: actual <- c(20,80) expected <- c(10,90) chisq.test(expected,actual) Sample size n=100, alpha=0.05, df=1. This gives a critical chi value of 3.84. By hand I can calculate the test…
user3213255
  • 21
  • 1
  • 1
  • 3
1 2 3
8
9