**Definition 1**: The **Weibull distribution** has the probability density function (pdf)

for *x* ≥ 0. Here *β* > 0 is the **shape** parameter and *α* > 0 is the **scale** parameter.

The cumulative distribution function (cdf) is

The inverse cumulative distribution function is *I*(*p*) =

**Observation**: If *x* represents “time-to-failure”, the Weibull distribution is characterized by the fact that the failure rate is proportional to a power of time, namely *β* – 1. Thus *β* can be interpreted as follows:

- A value of
*β*< 1 indicates that the failure rate decreases over time. This happens if there is significant “infant mortality”, or where defective items fail early with a failure rate decreasing over time as the defective items are weeded out of the population. - A value of
*β*= 1 indicates that the failure rate is constant over time. This might suggest random external events are causing mortality or failure. - A value of
*β*> 1 indicates that the failure rate increases with time. This happens if there is an “aging” process; e.g. if parts are more likely to wear out and/or fail as time goes on.

1/*α* can be viewed as the failure rate. The mean of the Weibull distribution is the mean time to failure (MTTF) or mean time between failures (MTBF) = .

Key statistical properties of the Weibull distribution are:

- Mean =
- Median =
- Mode (when
*β*> 1) = - Variance =

**Excel Function**: Excel provides the following function regarding the Weibull distribution.

**WEIBULL**(*x, β*, *α*, *cum*) where *α* and* β* are the parameters in Definition 1 and *cum* = TRUE or FALSE

WEIBULL(*x, β*, *α*, FALSE) = the value of the Weibull pdf *f*(*x*) at *x*

WEIBULL(*x, β*, *α*, TRUE) = the value of the Weibull cumulative distribution function *F*(*x*) at *x*

Excel 2010/2013 also provide the additional function **WEIBULL.DIST** which is equivalent to WEIBULL.

**Example 1**: The time to failure of a very sensitive computer screen follows a Weibull distribution with *α* = 1,000 hours and *β = *.6. What is the probability that the screen will last more than 5,000 hours? What is the mean time to failure?

The probability that the screen will last no more than 5,000 hours

= WEIBULL(5000, .6, 1000, TRUE) = 0.92767.

Thus, the probability that the screen will last more than 5,000 hours = 1 – 0.92767 = 7.2%

MTTF = *α*Γ(1+1/*β*) = 1000Γ(1+1/.6) = 1000*EXP(GAMMALN(1 + 1/.6)) = 1,504.575 hours

**Example 2**: If the mean time to failure for a component which follows a Weibull distribution is 1,000 hours with a standard deviation of 400 hours, what is the probability that the component will last more than 2,000 hours?

Thus

We now solve these equations for *α* and *β*. First we simplify the second equation and then we take the natural log of both sides of both equations to get

Eliminating α

which is equivalent to

The above equation takes the form *h*(*β*) = 0, which we solve using Excel’s Goal Seek capability by selecting **Data > What If Analysis|Goal Seek** and filling in the dialog box that appears as shown in Figure 2.

Once we obtain the value for *β*, we can calculate *α* using the equation

and then we can calculate the probability that the component will last more than 2,000 hours using the WEIBULL.DIST function.

**Figure 2 – Goal Seek initial guess**

After clicking on the **OK** button, the result is shown in Figure 3.

**Figure 3 – Goal Seek results**

The values for *α* and *β* are shown in cells B5 and B3. The probability that the component will last more than 2,000 hours is 0.91% (cell B6).

**Real Statistics Function**: Since Excel doesn’t provide an inverse function, you can use the following function provided by the Real Statistics Resource Pack instead.

**WEIBULL_INV**(*p**, β*, *α*) = *x* such that WEIBULL.DIST(*x, β*, *α*, TRUE) = *p*; i.e. the inverse of WEIBULL.DIST(*x, β*, *α*, TRUE)

Hi Charles, the article was very informative. I’m, working on a project to revise the maintenance schedule for a machine. I believe the time between failures follows a Weibull distribution as the chance of failure increases with increase in time after each maintenance. The average time of failure with the current maintenance schedule (every 700 hours) is 500 hours. So, am suggesting a revision of the current schedule to do a maintenance at every 500 hours. I calculated the parameters for the Weibull distribution. What I’m stuck now is at how I can quantify my results financially. In other words, for the new maintenance schedule, I have to show that the average time of failure if higher than what it is for the current schedule. Any insights on how I should go about this?

Deepika,

This sounds like a financial break-even analysis (and not a statistical analysis). You need to calculate the cost for each scheduled maintenance and then calculate the total cost over a sufficiently long period of time (this could be one year) based on whatever MTTF values you want to study. You then need to estimate the cost of one failure (in terms of repair costs, lost productivity, impact of the rest of the operation, etc.) and then based on the average number of failures per year (for each MTTF estimate) the total costs for failure.

Charles

Very nice and elegant. I compared your result of the Weibull parameter estimate from Mean and stdDev to the Weibull estimate function of .Net lib MathNet.Numerics.Distributions (also called Math.Net Numerics). Yours give a better estimate. I can’t paste pictures here, but if you drop me an email, I’ll email them to you.

Rgds, Reinoud

Reinoud,

Good to hear. You can find my email address at Contact Us.

Charles

I have monthly demand data for a certain product, it is following Weibull distribution (2 parameter,I calculated the 2 parameters). Now I want to know the 5 month distribution of demand based on the above information.

Does 5 month demand distribution also follows weibull, how to know that ?

Sorry, but I don’t know the answer to your question. Perhaps someone else can help. Also, perhaps the following paper can help>

https://www.jstor.org/stable/3009409?seq=1#page_scan_tab_contents

Charles

tq charles for reply my email..

during my reading, i have got some idea that to find the parameter of weibull distribution, we can find it by several methods such as maximum likelihood estimation MLE, modified maximum likelihood estimation (MMLE), energy patterm method (EPF) and etc…

my question is, how we can use that several methods in excel to find the parameter

Daniel,

Sorry, but I have not implemented these techniques for the Weibull distribution. With as little work you could use Excel’s Solver to implement this. I have shown how to do this sort of thing a number of times on the website.

Charles

hello…

how we can calculate the parameter for weibull distributions. can someone help me

Daniel,

You can use the approach shown in Example 2 of the referenced webpage.

Charles

A widget has Weibull distribution with shape 2.0 and scale 700. There are three identical widgets in parallel in my system such that a minimum of one is required. Given that all widgets have survived 200 hours so far, need the probability that one of the three widgets fails in the next 3 hours, another of the remaining two widgets fails within 15 minutes of the preceding widget failure, and the third widget survives the entire 3 hours and 15 minutes? Thanks

Sorry George,

This sounds like a homework assignment, and I have a rule that I won’t answer such questions.

Charles

Not a homework assignment. Its a real problem and a proposed solution is Prob(one failure in next 3 hours given survived 200 hours) * Prob(one failure in next 3 hours and 15 minutes given survived 200 hours) * Prob(no failure in next 3 hours and 15 minutes given survived 200 hours) * a multinomial coefficient of 6. The result seems unattractive compared to no failures at all which is modeled as (Prob(no failure in next 3 hours and 15 minutes given survived 200 hours))^3. I believe that the two failures should be calculated as the probability of two failures within 15 minutes of each other given both survived 200 hours, but do not know how to model such, or how to then incorporate the non failure.

George,

Let’s try to tackle the first of these problems, namely that “Given that all widgets have survived 200 hours so far, need the probability that one of the three widgets fails in the next 3 hours”.

We begin by tackling the simpler problem that “Given widget 1 has survived 200 hours so far, what is the probability that it fails in the next 3 hours?” Let A = widget 1 has survived 200 hours so far and B = widget 1 fails in the next 3 hours. You want P(B|A), which by Bayes’ theorem is equal to P(A and B) / P(A). Now P(A) = 1-WEIBULL(200,2.700,TRUE) = 1-.07839 = .92161. You can use WEIBULL.DIST instead of WEIBULL for versions of Excel after 2007. P(A and B) = WEIBULL(203,2.700,TRUE)-WEIBULL(200,2.700,TRUE) = .08066 – .07839 = .00227. Thus, P(B|A) = .00227/.92161 = .002464. This also means that given widget 1 has survived 200 hours so far, the probability that it does not fail in the next 3 hours is 1 – .002464 = .997536.

Assuming that the survivability of all the widgets are independent of each other, then the same calculation holds for widgets 2 and 3 as well. Since we want exactly one widget to fail and the other two to not fail, there are C(3,1) = 3 ways to choose the failing widget and so given that all widgets have survived 200 hours so far, the probability that exactly one of the three widgets fails in the next 3 hours = 3 * .002464 * .997536^2 = .007356.

Assuming I haven’t made a mistake in logic or arithmetic, this should take care of the first problem. I’ll let you handle the others.

Charles

Thanks

Is it possible to create a formula of the shape (a) and scale (B) parameters for a Weibull distribution to have a fixed mean but allow the user to change the variance?

For example Weibull(a,B) where EX=Fixed Number and VarX=d where d is all real numbers

I understand that the shape and scale parameters will change every time.

James,

I don’t understand your question. Once you specify the shape and scale parameters the mean and variance are determine (as described on the referenced webpage). If you specify only the mean and variance you can calculate the shape and scale parameters as shown in Example 2; in this case the function would Weibull1(mean, var).

Charles

Thank You. I finally figured it out. Your example was very helpful!

Hello Dr. Charles,

Happy Easter

For this problem:

Given a Weibully distributed population with a shape parameter of 4.66 and a scale parameter of 52. 12.6% is the probability of being greater than what value?

The answer should be 60.79592

Using WEIBULL(12.6, 4.66, 52, TRUE) I get 0.00135

I am not sure how to get the correct amswer

Thanks

Gami

Gami,

I think you are asking me, what is the value of x such that WEIBULL(x, 4.66, 52, TRUE) = 1 – .126.

You can try to find the value of 60.79592 by trial and error, guessing at the correct value of x.

You can also use the Real Statistics formula =WEIBULL_INV(1-.126,52,4.66).

Charles

Perfect!!

The WEIBULL_INV worked like a charm

Thanks again

Gami

Hello Charles:

How can I solve the following problems in Excel using the “WEIBULL.DIST” function?

1) Given a Weibully distributed population with a shape parameter of 3.93 and a scale parameter of 151. 34.2% is the probability of being greater than what value?

2)What is the probability that a randomly selected item from a population having a Weibull distribution with a shape parameter of 3 and a scale parameter of 109.3 has a value between 85.6 and 97.5?

Thank you

Gami Nasir

Gami,

1) WEIBULL(x, β, α, TRUE) = the probability that the distribution has a values less than or equal to x, where alpha is the scale parameter and beta is the shape parameter.

2) The probability that the distribution has a value between x1 and x2 is WEIBULL(x2, β, α, TRUE) – WEIBULL(x1, β, α, TRUE).

Charles

Thank you very much Sir!

Hello Dr. Charles,

For this problem:

Given a Weibully distributed population with a shape parameter of 4.66 and a scale parameter of 52. 12.6% is the probability of being greater than what value?

The answer should be 60.79592

Using WEIBULL(12.6, 4.66, 52, TRUE) I get 0.00135

I am not sure how to get the correct amswer

Thanks

Gami

Charles,

One more question: In the final example 2 equation, after you substitute for alpha, how are you simplifying ln(1,160,000)-2*ln(1,000) into ln(1.6)? I get ln(1,160,000)-2*ln(1,000) = .14842, but ln(1.6) = .470004.

I apologize in advance if I’ve made some simple arithmetic error, or if I’m forgetting some natural log rule… 🙂

Thanks,

Zach

Hi Zach,

You are correct. It looks like I made a typing error. ln(1,160,000)-2*ln(1,000) should be ln(1.16), calculated as follows.

In general, ln(x)-2ln(y) = ln(x)-ln(y^2) = ln(x/y^2). Thus, ln(1,160,000)-2*ln(1,000) = ln(1,160,000/1,000^2) = ln(1,160,000/1,000,000) = ln(1.16).

Thanks for catching this. I will correct the referenced webpage shortly.

Charles

Glad I could help! Thanks for the explanation and quick response.

Zach,

Your help is very appreciated. I have just corrected the referenced webpage. I hope I got it correct this time.

Charles

Charles, I’m confused about how you calculated the excel values in Figures 2 and 3. For the F(2000) calculation using the excel WEIBULL.DIST function, which takes WEIBULL.DIST(x, Alpha, Beta, Cumulative), you seem to have selected your Beta value (B3) for Alpha, and your Alpha value (B5) for Beta. Is something wrong there, or did you intentionally swap the two values?

Any clarification would be very appreciated!

-Zach

Zach,

Excel swapped the usual definitions of alpha and beta. I just flipped then back. In any case, either way, you should have WEIBULL.DIST(x, scale, shape, cum).

Charles

ahhh, I see what you mean. Good old Microsoft…

Thank you for the explanation! Your website is very helpful. 🙂

Cheers,

-Zach

Sir

In variance equation (example 2) why you use 12/beta, instead of 2/beta, as it is told at “key statistical properties of the Weibull distribution” section?

Thanks alot

Nugroho

Nugroho,

Thanks for catching this error. The value in the example should be 2/beta. In fact, there are a couple of errors in this example, which hopefully I have now corrected.

Thanks for your help in making the website more accurate.

Charles

Hi Charles ,

You wrote an interesting subject.

I am trying to find the excel formula for variance of the Weibull distribution given you have the alpha, beta, and mean. Can you share with us ?

Thanks.

The formula for the variance from the alpha, beta, and mean µ can be found on the referenced webpage.

Charles

Hello,

I would like to run a Weibull analysis to determine how many cycles to run a selected sample set to. For example, if I have a hydraulic cylinder that is designed for 2000 cycles, how many cycles do I have to run a sample set of ‘X’ to have a confidence level of ‘Y’ with a β of ‘Z’? How would the Weibull equation be set up to perform this function. Thanks in advance.

Ron,

Before answering your question, let me make sure that I understand your question properly.

1. I have a hydraulic cylinder that is designed for 2000 cycles.

[CZ] I assume that you mean that the MTTF = 2000. Is this correct?

2. How many cycles do I have to run a sample set of ‘X’ to have a confidence level of ‘Y’ with a β of ‘Z’?

[CZ] I understand that Y takes a value such as 95%, meaning that you want a 95% confidence interval. I assume that Z takes a value such as .6. Is this correct? I don’t understand what sort of values X takes; can you explain this better?

Charles

Very good explanation, it helped me a lot! Thanks!

Hi,

I’m trying to analyze data in Table 4 of this report on electronic waste (e-waste) in the U.S.:

U.S. EPA, 2011

I’m trying to determine what Weibull scaling factor and shape factor would best describe the data in Table 4. For example, for portable computers, we have:

20% are discarded in 4 years

35% are discarded in 5 years

55% are discarded in 6 years, and

100% are discarded in 7 years.

What scaling factor and shape factor would come closest to those values? Just by trial and error and eyeballing, I came up with a shape factor of 4.1 and a scale factor of 5.8. With those values, I get cumulative discards in years 4 through 7 of:

Year 4 = 20% (versus 20%)

Year 5 = 42% (versus 35%)

Year 6 = 68% (versus 55%), and

Year 7 = 88% (versus 100%).

But I’d like to do something that’s quicker than trial and error, and hopefully matches Table 4 a little better. (Though I realize Table 4 may contain data that simply don’t follow a realistic Weibull distribution.)

Thanks!

Mark

You can calculate the mean and standard deviation of the data that you have and then use the approach described in Example 2 of the referenced webpage to estimate the values of the shape and scaling factors.

Charles

Hi, Sir.

How can I compute the values of shape and scale parameters given that I have the values of mean and standard deviation?

Lara,

I have just added Example 2 to the referenced webpage. This example shows how to calculate the shape and scale parameters from the mean and standard deviation.

Charles

Hi,

Thanks for the above information.

I have a problem , in which I need to use the Weibull distribution to generate a few data points to simulate a systems. This basically means, given the MTTF, alpha and beta, I need to come up with various time instances at which the system faults occur and use these time instances to simulate the response of the system.

Could you please suggest a way to get these time “fault time instances” such that it follows a Weibull distribution with given parameters.

Any help is appreciated. Thanks in advance. 🙂

Siva,

To generate a random data element which follows a Weibull distribution with fixed alpha and beta values you can use the Real Statistics formula

=WEIBULL_INV(RAND(),alpha,beta)

Alternatively, you can use the Excel formula

=alpha*(-LN(1-RAND()))^(1/beta)

Finally note that MTTF = alpha*Gamma(1+1/beta), and so if you have any two of the values alpha, beta and MTTF the third is determined. Thus, if you are given all three you need to make sure that the three values are compatible.

Charles

thank you sir,

please would you like to give me how can i calculate alpha and beta from standard deviation and average using excel (target value).

Lisa

Lisa,

The referenced webpage shows how to calculate the mean and variance (and therefore standard deviation) from the alpha and beta parameters. Theoretically you should be able to solve for alpha and beta if you know the values of the mean and standard deviation (two equations in two unknowns). Given that the equations involve the gamma function this may not be so easy to do analytically. You should be able to come up with approximate solutions by using Solver, however.

I don’t know what you mean by “target value”, however.

Charles

Pingback: Weibull Distribution Confusion « S H A N E K R A M E R

I think that, in example 1 the value of Alpha is being Substituted with Beta , and this is really confusing for me , Could you honored confirm my assertion.

Thanks alot

Hassan Elsafty

Hassan,

I just checked and it seems that everything is correct in Example 1.

Charles

Something is still off. “Beta = 1000 hours”. According to the tutorial above, “beta” should be unit-less. “alpha” should have units of time (1/alpha is mean failure rate). Your use of “beta” and “alpha” in the tutorial is opposite to the use of “beta” and “alpha” in the Excel function.

Evan,

Thank you for identifying this problem. Excel interchanges the roles of alpha and beta from what is used in other sources. Beta is commonly used as the shape (or slope) parameter and alpha as the scale parameter, although other symbols are used by various authors. I have now corrected the referenced webpage to be consistent with this choice of symbols, and so the Excel Weibull function becomes WEIBULL(x, beta, alpha, cum).

Charles

I need more application by using weibull distribution on health related area.

I’ll try to add an application of Weibull to healthcare area in the future.

Charles

Sir

Are mean time to failure (MTTF) and mean time before failure (MTBF) the same?

I just heard of mean time to repair (MTTR), I haven’t heard of MTTF.

Colin,

MTTF = the average time to the first failure. This measure is particularly important for items that can’t repaired (e.g. a typical light bulb).

MTBF = the average time between failure. This measure is used with repairable items.

Charles