The two-parameter Weibull probability density function

You're viewing an older version of this page (#214). View the current version.

View versions (1)

Interface

#include <codecogs/statistics/distributions/continuous/weibull/pdf.h>

using namespace Statistics::Distributions::Continuous::Weibull;

The Weibull distribution is a two-parameter distribution named after Waloddi Weibull. It is often also called the Rosin-Rammler distribution when used to describe the size distribution of particles.

The probability density function, given by

f(x) = \frac{a}{b}{{\left( \frac{x}{b} \right)}^{a-1}} e^{-{{(x/b) }^a}}
(1)

\graph x=50:150 a=5:20:4 b=100

In its standard form, b=1, therefore

f(x) = a x^{a-1} e^{- x^a}
(2)

\graph x=0:2 a=5:20:4 b=1

References

  • M.Abramowitz and I.A.Stegun, Handbook of Mathematical Functions, 1964 chapt.26.1; http://www.weibull.com
  • Weibull, W. (1951) A statistical distribution function of wide applicability. J. Appl. Mech.-Trans. ASME 18(3), 293-297

Example 1

#include <iostream>
#include <codecogs/statistics/distributions/continuous/weibull/pdf.h>
using namespace Stats::Dists::Continuous::Weibull;

int main()
{
  std::cout << "PDF(105,20,100) = " << PDF( 105, 20, 100 ) << std::endl;
  return 0;
}

Output

PDF(105,20,100) = 0.035589

Parameters

x
the value at which to evaluate the distribution
a
shape parameter
b
scale parameter

Returns

probability density value
GPL Licence — free for non commercial use. See Licence details.

Interactive Calculator

x
a
b
Result