How to solve for Weibull distribution parameters using Excel's Solver?

In summary, the Weibull CDF is 1-exp(-(x/\theta)^\tau) and the equation for minimizing the sum of squared deviations is: x(.25) - 1.5 + (x(.75) - 250)^2.
  • #1
Iwicka
2
0

Homework Statement



Asked to find Weibull distribution parameters, [itex]\theta[/itex] and [itex]\tau[/itex], using Excel's Solver feature. I know that the 25th percentile is 1500 and the 75th percentile is 250000.

Homework Equations



Weibull CDF = 1-exp(-(x/[itex]\theta[/itex])^[itex]\tau[/itex])

The Attempt at a Solution



I have solved the solution by paper to yeild: [itex]\theta[/itex]=86384.36181, [itex]\tau[/itex]=0.307375855.

In Excel's Solver:
Objective cell is the formula: =EXP(-(1500/C2)^C3)-0.75
Optimize value of: 0
By Changing Cells: C2 and C3, which are my [itex]\theta[/itex] and [itex]\tau[/itex] values respectively.
Constraints: cell with formula: EXP(-(250000/C2)^C3)-0.25 constrained to be 0.

The solver is not able to find the solution. What am I doing wrong?
 
Physics news on Phys.org
  • #2
Iwicka said:

Homework Statement



Asked to find Weibull distribution parameters, [itex]\theta[/itex] and [itex]\tau[/itex], using Excel's Solver feature. I know that the 25th percentile is 1500 and the 75th percentile is 250000.

Homework Equations



Weibull CDF = 1-exp(-(x/[itex]\theta[/itex])^[itex]\tau[/itex])

The Attempt at a Solution



I have solved the solution by paper to yeild: [itex]\theta[/itex]=86384.36181, [itex]\tau[/itex]=0.307375855.

In Excel's Solver:
Objective cell is the formula: =EXP(-(1500/C2)^C3)-0.75
Optimize value of: 0
By Changing Cells: C2 and C3, which are my [itex]\theta[/itex] and [itex]\tau[/itex] values respectively.
Constraints: cell with formula: EXP(-(250000/C2)^C3)-0.25 constrained to be 0.

The solver is not able to find the solution. What am I doing wrong?

The EXCEL Solver can sometimes choke on highly nonlinear problems, because it tries to solve equations using quasi-Newton methods but with derivatives replaced by finite differences; or it may try to perform a sequence of successive quadratic fits, etc. So, your problem has two issues: (i) difficult nonlinearity; and (ii) bad scaling. One of the EXCEL Solver options is an "automatic scaling" setting, but I would not trust it---in fact, it seemed to not work when I tried it; instead, I would scale manually (using percentiles 1.5 and 250 instead of 1500 and 250000). Also, rather than solving the equations, I would suggest minimizing the sum of squared deviations.

Even so, I could not get it to work until I re-cast the problem: for
[tex] W(x) = 1 - \exp(-(x/a)^b),[/tex] (using a and b instead of θ and τ) we can solve W(x) = p as x = x(p), where
[tex] x(p) = a\, \exp\left( \frac{\ln(-\ln(1-p))}{b}\right).[/tex]
Now minimizing the sum of squares (x(.25) - 1.5)^2 + (x(.75) - 250)^2 seems to work well: it gives a = 86.14852 and b = 0.306587316 (close to what you want, re-scaled). By re-starting the Solver from this point and re-setting some of the parameters, better accuracy can perhaps be obtained; however, there is a fundamental limit to the attainable precision, due to the Solver's use of finite-differences in place of analytical derivatives.

RGV
 
  • #3
Thank you for replying Ray, I appreciate it.

Here's how I ended up solving the problem. The Weibull distribution has a VaR(p) formula, which is the "Value at Risk"; essentially it directly translates into the X value of the distribution that corresponds to a percentile for the distribution.

The formula for the Weibull is: VaR(p) = [itex]\theta[/itex](-LN(1-p))1/[itex]\tau[/itex], where p is the percentile.

Then I entered this formula into my Solver as the objective using the same methods I prescribed earlier and voila! It worked.

I hope this helps anyone else that has a similar problem.
 

Related to How to solve for Weibull distribution parameters using Excel's Solver?

1. What is the Weibull distribution?

The Weibull distribution is a continuous probability distribution commonly used in reliability engineering and risk analysis to model the failure rate of a system over time. It is described by two parameters: the shape parameter (k) and the scale parameter (λ).

2. How is the Weibull distribution used in Excel's Solver?

Excel's Solver is a tool used for optimization and finding the best fit for a given set of data. In the case of the Weibull distribution, Solver can be used to determine the values of the shape and scale parameters that best fit the given data set.

3. What are the steps for solving for Weibull distribution parameters using Excel's Solver?

The following are the steps for solving for Weibull distribution parameters using Excel's Solver:

  1. Enter the data set into an Excel spreadsheet.
  2. Create a column for the probability density function (PDF) of the Weibull distribution, using the formula =WEIBULL.DIST(x, shape, scale, FALSE), where x is the data point, shape and scale are the variables to be determined, and FALSE indicates that the PDF is not cumulative.
  3. Create a cell for the sum of squared errors (SSE) by subtracting the actual data values from the PDF values and squaring the differences.
  4. Use Solver to minimize the SSE by changing the values of the shape and scale parameters.
  5. Once Solver has found the optimal values for the shape and scale parameters, the Weibull distribution curve can be plotted on the same graph as the data set.

4. What are the limitations of using Excel's Solver for solving for Weibull distribution parameters?

While Excel's Solver can be a useful tool for finding the best fit for a given data set, it has some limitations when it comes to solving for Weibull distribution parameters. One limitation is that it may not always converge to a solution, especially if the data set is complex or includes extreme values. Additionally, Solver may not always find the global minimum for the SSE, resulting in slightly different values for the parameters each time it is run.

5. Are there any alternative methods for solving for Weibull distribution parameters?

Yes, there are alternative methods for solving for Weibull distribution parameters, such as maximum likelihood estimation (MLE) or graphical methods. MLE involves using statistical software to determine the parameters that maximize the likelihood of the observed data, while graphical methods use graphical techniques to visually estimate the values of the parameters. These methods may be more accurate and reliable than using Excel's Solver, but they also require some statistical knowledge and may be more time-consuming.

Similar threads

  • Set Theory, Logic, Probability, Statistics
Replies
1
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
1
Views
957
Replies
11
Views
27K
Replies
3
Views
2K
Back
Top