# Two Parameters Weibull Distribution

• /
• Blog
• /
• Two Parameters Weibull Distribution

The Weibull distribution is a continuous probability distribution that is commonly used in reliability engineering and statistical analysis. It is named after Waloddi Weibull, who developed the distribution to describe the strength of materials.

The Weibull distribution has two parameters: shape and scale. The shape parameter, often denoted by the symbol $$\alpha$$, determines the shape of the distribution. A small value of $$\alpha$$ (e.g., $$\alpha$$ < 1) indicates a distribution with a long tail, while a large value of $$\alpha$$ (e.g., $$\alpha$$ > 1) indicates a distribution with a short tail.

The scale parameter, often denoted by the symbol $$\beta$$, determines the spread of the distribution. A large value of $$\beta$$ indicates a distribution with a large spread, while a small value of $$\beta$$ indicates a distribution with a small spread.

The 3-parameter Weibull Distribution will be covered in a separate post. The third parameter is the threshold parameter. When the threshold parameter is zero, the three-parameter Weibull Distribution reduces to two-parameter Weibull Distribution.

## PDF and CDF of 2-parameter Weibull Distribution

The probability density function (PDF) of the Weibull distribution is given by:

$$f(x) = \frac{\alpha}{\beta} \left(\frac{x}{\beta}\right)^{\alpha-1} e^{-\left(\frac{x}{\beta}\right)^\alpha}$$

The cumulative distribution function (CDF) of the Weibull distribution is given by:

$$F(x) = 1 - e^{-\left(\frac{x}{\beta}\right)^\alpha}$$

The Weibull distribution is often used to model failure times, as it can describe both early and late failures.

## Weibull Distribution Calculator:

Find the area under the Weibull Distribution (Left or Right Tail)

 function weibull_distribution(x, k, lambda) { return (k / lambda) * Math.pow(x / lambda, k - 1) * Math.exp(-Math.pow(x / lambda, k)); } function calculateAreaUnderCurve() { const xValueInput = document.getElementById('x-value'); const tailSelection = document.getElementById('tail-selection'); const shapeInput = document.getElementById('shape'); const scaleInput = document.getElementById('scale'); const resultContainer = document.getElementById('result'); const xValue = parseFloat(xValueInput.value); const tail = tailSelection.value; const k = parseFloat(shapeInput.value); const lambda = parseFloat(scaleInput.value); if (isNaN(xValue)) { alert('Please enter a valid x value.'); return; } if (isNaN(k) || k <= 0) { alert('Please enter a valid shape parameter (k) greater than 0.'); return; } if (isNaN(lambda) || lambda <= 0) { alert('Please enter a valid scale parameter (lambda) greater than 0.'); return; } let areaUnderCurve; if (tail === 'left') { areaUnderCurve = 1 - Math.exp(-Math.pow(xValue / lambda, k)); } else if (tail === 'right') { areaUnderCurve = Math.exp(-Math.pow(xValue / lambda, k)); } drawWeibullDistributionCurve(xValue, tail, k, lambda); resultContainer.textContent = 'Area Under Curve: ' + areaUnderCurve.toFixed(4); } function calculateXValue() { const probabilityInput = document.getElementById("probability-input"); const tailSelectionInverse = document.getElementById("tail-selection-inverse"); const shapeInputInverse = document.getElementById('shape-inverse'); const scaleInputInverse = document.getElementById('scale-inverse'); const resultContainerInverse = document.getElementById("result-inverse"); const probability = parseFloat(probabilityInput.value); const tail = tailSelectionInverse.value; const k = parseFloat(shapeInputInverse.value); const lambda = parseFloat(scaleInputInverse.value); if (isNaN(probability) || probability < 0 || probability > 1) { alert('Please enter a valid probability between 0 and 1.'); return; } if (isNaN(k) || k <= 0) { alert('Please enter a valid shape parameter (k) greater than 0.'); return; } if (isNaN(lambda) || lambda <= 0) { alert('Please enter a valid scale parameter (lambda) greater than 0.'); return; } let xValue; if (tail === 'left') { xValue = lambda * Math.pow(-Math.log(1 - probability), 1 / k); } else if (tail === 'right') { xValue = lambda * Math.pow(-Math.log(probability), 1 / k); } resultContainerInverse.textContent = 'x Value: ' + xValue.toFixed(4); drawWeibullDistributionCurve(xValue, tail, k, lambda); } function drawWeibullDistributionCurve(xValue, tail, k, lambda) { const x = Array.from({ length: 1000 }, (_, i) => 0 + (i * (2 * lambda * Math.pow(k, 0.5))) / 1000); const y = x.map(xi => weibull_distribution(xi, k, lambda)); let fillX, fillY; if (tail === 'left') { fillX = x.filter(xi => xi <= xValue); } else if (tail === 'right') { fillX = x.filter(xi => xi >= xValue); } fillY = fillX.map(xi => weibull_distribution(xi, k, lambda)); const trace1 = { x: x, y: y, mode: 'lines', name: 'Weibull Distribution', line: { color: '#1f77b4', width: 2 } }; const trace2 = { x: fillX, y: fillY, mode: 'lines', name: 'Area Under Curve', line: { color: '#ff7f0e', width: 2 }, fill: 'tozeroy' }; const layout = { title: 'Weibull Distribution', xaxis: { title: 'x' }, yaxis: { title: 'Density' }, showlegend: true }; const data = [trace1, trace2]; Plotly.newPlot('curve-plot', data, layout); } 

## Properties of Weibull Distribution:

The Weibull distribution has several important properties, including:

Continuous values: The Weibull distribution is a continuous probability distribution, meaning that it can take any value between $$-\infty$$ and $$+\infty$$.

Monotonically increasing: The Weibull distribution is monotonically increasing, meaning that the probability of a value occurring increases as the value increases.

Asymptotic: The Weibull distribution approaches but never reaches the x-axis as the values of x become increasingly large.

Exponential Distribution: When the shape parameter ($$\alpha$$) is equal to 1, the distribution has a constant failure rate and reduces to an Exponential Distribution.

## Shape Factor (in the context of Reliability Engineering):

In reliability engineering, the shape factor measures the shape of the failure rate curve over time. The failure rate is the rate at which a device or system fails over a given period of time. It is usually expressed as the number of failures per unit of time, such as failures per hour or failures per year.

If the shape factor is less than 1, the failure rate curve is said to be decreasing or diminishing. This means that the rate of failures is decreasing over time. This can occur if the device or system is designed well and has few initial failures or if the device or system is repaired or replaced after a failure.

If the shape factor is greater than 1, the failure rate curve is said to be increasing or escalating. This means that the rate of failures is increasing over time. This can occur if the device or system is not well-maintained or if it is subjected to extreme conditions that increase the likelihood of failure.

If the shape factor equals 1, the failure rate curve is said to be constant. This means that the rate of failures is constant over time. This can occur if the device or system is designed well and is subjected to consistent conditions that do not significantly affect the likelihood of failure.

## Mean and Variance:

The mean and variance of the Weibull distribution are given by the following formulas:

Mean:

$$\mu = \beta\Gamma\left(1 + \frac{1}{\alpha}\right)$$

Where β is the scale parameter and α is the shape parameter of the Weibull distribution, and Γ is the gamma function.

Variance:

$$\sigma^2 = \beta^2\left[\Gamma\left(1 + \frac{2}{\alpha}\right) - \Gamma^2\left(1 + \frac{1}{\alpha}\right)\right]$$

Where β is the scale parameter and α is the shape parameter of the Weibull distribution, and Γ is the gamma function.

## Using Excel:

In Excel, you can use the following functions to calculate probabilities and values for the two-parameter Weibull distribution:

WEIBULL.DIST: This function calculates the probability density function (PDF) of the Weibull distribution. The syntax is:

WEIBULL.DIST(x, alpha, beta, cumulative)

Where x is the value for which you want to calculate the probability, alpha is the shape parameter, beta is the scale parameter, and cumulative is a logical value indicating whether you want the cumulative distribution function (CDF) or the PDF. If cumulative is TRUE, the function returns the CDF; if it is FALSE, the function returns the PDF.

### Example:

Suppose you have a component with a shape parameter of 1.5 and a scale parameter of 100 hours. You want to calculate the probability that the component will fail within 80 hours.

To do this, you can use the WEIBULL.DIST function as follows:

=WEIBULL.DIST(80,1.5, 100, TRUE) = 0.5110 This will calculate the cumulative density function (CDF) of the Weibull distribution for the given value, shape, and scale parameters.

This is the probability that the component will fail within 80 hours.

Posted on December 28, 2022 by  Quality Gurus

Similar Posts:

September 9, 2023

## Degrees of Freedom in Hypothesis Testing: A Comprehensive Guide

Degrees of Freedom in Hypothesis Testing: A Comprehensive Guide

December 16, 2022

## Continuous vs. Discrete Data

Continuous vs. Discrete Data

November 3, 2021

## Examples of Six Sigma Projects

Examples of Six Sigma Projects

32 Courses on SALE!