I want to compare two Weibull distributions fitted to two different datasets. Both datasets have a distribution that resembles the Weibull so the idea was to compare the fitted Weibull distributions to conclude whether the difference in the distribution of the two datasets is statistically significant. To this end I found a post by Ben Bolker on the R help mailing list that describes how to do this in R, that states the following:

(1) Fit a single model to the combined (pooled data) (e.g. with MASS::fitdistr()); (2) fit separate models to the individual datasets; (3) compare the log-likelihood of the pooled model to the sum of the log-likelihoods of the separate models.

According to the likelihood ratio test, the p-value of the differences is:


(2 df because the separate models have a total of 4 parameters, 2 greater than the pooled model)

This is the original post: http://r.789695.n4.nabble.com/Comparison-of-two-weibull-distributions-td4679632.html

My question is, what is the null hypothesis in this likelihood ratio test? I get a P-value=0.4258827 and I don't know whether this means that the 2 Weibull distributions come from the same distribution or not. Please someone clarify this.

  • 4
    $\begingroup$ Note that the pooled model is a special case of the two separate models - when the scale and shape parameters of each are respectively equal. $\endgroup$ Commented May 11, 2017 at 18:19
  • $\begingroup$ The link to the 3rd party mail archive is no longer working, here is a link to the archives directly from the mailing lists: stat.ethz.ch/pipermail/r-help/2013-November/362548.html $\endgroup$
    – snaut
    Commented Feb 9, 2023 at 8:26

1 Answer 1


My question is, what is the null hypothesis in this likelihood ratio test?

Under the null for that particular test as described, all the parameters are the same (which is why you were fitting a single Weibull to all the data under that case) -- under the shape-scale parameterization

$$f(x;\lambda,\theta) =\frac{\theta}{\lambda}\left(\frac{x}{\lambda}\right)^{\theta-1}e^{-(x/\lambda)^{\theta}} \: \mathbb{I}_{x\geq0}\,,\quad \theta,\lambda>0$$

the null would be that both the shape and scale parameters ($\theta$ and $\lambda$ respectively) are the same, which you might write as:

$$H_0: \theta_1=\theta_2\, , \: \lambda_1=\lambda_2$$

It's your null and alternative hypotheses that determine the likelihood ratio test that you do, not the other way around. If that's not the null you wanted to test you have to set the test up differently. The test takes the ratio of likelihoods under the null and alternative (and asymptotically, minus twice its log will be chi-squared distributed under fairly broad conditions).

I get a P-value=0.4258827 and I don't know whether this means that the 2 Weibull distributions come from the same distribution or not.

Note that you don't state a significance level anywhere. You shouldn't even do the calculations for a test until you have picked one, and until you're clear what your rejection rule will be.

(If you're asking here how to interpret a p-value or what a p-value greater than your significance level - assuming it is - means, we have many discussions on that topic which can be searched for. There's little value in repeating what's been said very well on the basic mechanics of how hypothesis tests work. Start with Wikipedia on statistical hypothesis testing under "An alternative process", and there's some discussion here and here for example. Since explanations of what to do are easy to find I assume your actual issue is somewhat different.)

If you understand that you don't reject (presuming your significance level is lower than your p-value here), but are asking about how to interpret the non-rejection, note that failure to reject the null does not mean that the two distributions are the same (as your question suggests).

It means there's no clear indication that they're different above what you'd be able to explain as due to random variation. Which is to say that the data are reasonably consistent with them having come from the same Weibull. This is not at all the same as being able to assert that they actually do.

It may in that situation be reasonable to act as if they're all drawn from the same distribution, but we don't know it to be so.

  • 1
    $\begingroup$ So the answer in a few words: The null hypothesis is that both samples are drawn from a single Weibull distribution (i.e., the two distributions are the same); a large P value fails to provide support against the null hypothesis. $\endgroup$ Commented May 16, 2017 at 0:10
  • 1
    $\begingroup$ Yes, though it's a slightly awkward way to phrase it. A large p-value would indicate that the deviation in the two sample estimates of the parameters is not inconsistent with the population parameter estimates being the same and there just being random variation. $\endgroup$
    – Glen_b
    Commented May 16, 2017 at 5:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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