This is very much related to my earlier post FindDistributionParameters and Hypothesis Testing. However, I did not get a satisfactory anaswer and it keeps bugging me. I am trying to get help this time with an easier example.

I generate some data:

data = RandomVariate[WeibullDistribution[1.80631, 421.258],1000];

When I run the following code:

FindDistributionParameters[data, WeibullDistribution[a, b],
  ParameterEstimator -> "MethodOfMoments"] 

I get values of $a$ and $b$. I want to test whether $a = 1$ in fitting the data to the Weibull distribution. Can anybody help me please?

  • $\begingroup$ You could perform a parametric bootstrap as explained here and check whether or not the confidence interval around a includes 1. $\endgroup$ – Sjoerd C. de Vries Jun 7 '15 at 21:57
  • $\begingroup$ @Sjoerd Thank you for your suggestion. $\endgroup$ – ramesh Jun 7 '15 at 22:14
  • $\begingroup$ How about DistributionFitTest[data, WeibullDistribution[1, b]] ? $\endgroup$ – Stefan R Jun 9 '15 at 22:24

You specifically use the method of moments, is that meant to be a real problem constraint?

If you can instead use the maximum likelihood estimate for {a,b} then you can you perform a straightforward likelihood ratio (LR) test. In the following quick check, the LR test statistic is approximately Chi-Square distributed (see Wilk's theorem), so you can accept the null hypothesis that a=1 unless the test statistic exceeds InverseCDF[ChiSquareDistribution[1], 1 - \[Alpha]].

(* Null hypothesis, b is a nuisance parameter *)
H[0] = WeibullDistribution[1, b];

(* Alternative hypothesis, which has one more degree of freedom. *)
H[1] = WeibullDistribution[a, b];

(* Check the distribution of the LR test statistic *)
sampleSize = 100;
lrTestStatistic = Table[
   data = RandomVariate[WeibullDistribution[1, 421.258], 1000];
   sol[0] = FindDistributionParameters[data, H[0]];
   sol[1] = FindDistributionParameters[data, H[1]];
   -2 (LogLikelihood[H[0]/.sol[0], data] - LogLikelihood[H[1]/.sol[1], data]),

(* by the eyeball test, I'd say we've met the assumptions for Wilk's theorem to hold *)
\[Alpha] = 0.05;
   CDF[EmpiricalDistribution[lrTestStatistic], x],
   CDF[ChiSquareDistribution[1], x]},
   {x, 0, 2 InverseCDF[ChiSquareDistribution[1], 1 - \[Alpha]]}
  • $\begingroup$ Thank you Ian for your answer. MM is not my prefer method of estimation. It could be ML too. I think this helps me. Thank you. $\endgroup$ – ramesh Jun 8 '15 at 2:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.