Group Abstract Group Abstract

Message Boards Message Boards

0
|
11.3K Views
|
9 Replies
|
0 Total Likes
View groups...
Share
Share this post:

How to check goodness of fit?

Posted 10 years ago

How to check goodness of fit other than normal distribution whose pdf is not so fimiliar.

POSTED BY: Maha haroon
9 Replies

Use DistributionFitTest. Here is an example I ran with some random data (certainly does not fit the Burr distribution).

data = RandomReal[{0, 1}, 400];
test = DistributionFitTest[data, SinghMaddalaDistribution[2, 2.5, 3],"HypothesisTestData"];
test["TestDataTable", All]

The Burr distribution is called the Singh-Maddala distribution in Mathematica (and in many other places). The output of the last command will be a table with the results (statistics and p-values) of applying the tests Mathematica considers appropriate for the data used (Anderson-Darling, Cramer-von Mises, Kolmogorov-Smirnov, etc.).

Notice that one needs to enter the distribution parameters one wants to test. That is generally necessary, except for distributions that are 'nicely' scalable, such as the normal distribution. If you think some distribution of this type should fit your data, but you are not sure what parameters would work, then you are dealing with a different problem and you should use a different tool (in that case I would use FindDistributionParameters).

Best,

OL.

POSTED BY: Otto Linsuain
  1. You should always use descriptive names for your variables. "A", "L" aren't useful variable names. Use names like "data" or "myDistribution"
  2. Don't use capitalized names for your variables. Capitalized variable names are reserved for built-in functions.
  3. There is no reason to sort the data.

Try using EstimatedDistribution for FindDistributionParameters. You are not using those functions.

POSTED BY: Sean Clarke
Posted 10 years ago

I am interested in finding the goodness of fit test. For parameter testing it gives no answer.Plz check where I commit the mistake.

POSTED BY: Maha haroon

Can you give the code you tried that uses EstimatedDistribution or FindDistributionParameters?

POSTED BY: Sean Clarke
Posted 10 years ago

Thank you Sean...I have applied your suggested approach. But It gives no result,Tell me where is error as I have attach the file .

Attachments:
POSTED BY: Maha haroon

You can define a new probability distribution with the ProbabilityDistribution function: http://reference.wolfram.com/language/ref/ProbabilityDistribution.html

Then, you can fit that distribution to your data with EstimatedDistribution: http://reference.wolfram.com/language/ref/EstimatedDistribution.html

POSTED BY: Sean Clarke
Posted 10 years ago

Thank you Sean...I have applied your suggested approach. But It gives no result,Tell me where is error as I have attach the file .

Attachments:
POSTED BY: Maha haroon
Posted 10 years ago

Sir I want to see whether data fit the Burr distribution... there are no of tests link Anderson Darling .... Chi Squre test ... but the mathematica have just the built in function for normality not for other distrbution.

POSTED BY: Maha haroon

You surely are a bit scarce with providing information on what you are trying to solve, what kind of data, and what functions you have used/tried. So I will give a general answer:

If you used LinearModelFit or NonlinearModelFit you can query many options, the simplest being the residuals, but there are also ANOVA tables and many more values you can obtain from your fits...

Have a look at the help of those.

POSTED BY: Sander Huisman
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard