Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1
  • 2

TOPIC: Weibull distribution parameters

Weibull distribution parameters 9 years 7 months ago #12

I've a question regarding to the Weibull distribution, so often used in the Amalthea benchmarks.
In the files, the typical parameters (shape, scale, location) are missing;
all we have are: mean, lower bound, upper bound and a parameter named "remain promille".

Do you assume some shape parameter value by default?

Is it somehow possible to determine the typical parameters for, say, the following extract:
      <runnableItems xsi:type="sw:InstructionsDeviation">
        <deviation>
          <lowerBound xsi:type="common:LongObject" value="72000"/>
          <upperBound xsi:type="common:LongObject" value="88000"/>
          <distribution xsi:type="common:WeibullEstimators" pRemainPromille="0.5">
            <mean xsi:type="common:LongObject" value="80000"/>
          </distribution>
        </deviation>
      </runnableItems>

thank you in advance,
Piotr Dziurzanski
Last Edit: 9 years 7 months ago by pdziurzanski.
The administrator has disabled public write access.

Weibull distribution parameters 9 years 7 months ago #13

  • schste
  • schste's Avatar
  • OFFLINE
  • AMALTHEA Developer
  • Posts: 5
  • Karma: 2
Hello,

the idea behind this approach is to calculate the parameters for the Weibull distribution using execution time measurements for the Runnables.

While the values lowerBound, mean and upperBound originate from the measurement, pRemainPromille is an additional configuration parameter.
This parameter is required to calculate the shape and scale parameter for the distribution.
It denotes the remaining probability at the upperBound according to the probability density function of the Weibull distribution.

This calculation for example is done by the timing simulation tool TA Simulator of the project partner Timing-Architects.

Kind regards,
Stefan Schmidhuber
Last Edit: 9 years 7 months ago by schste.
The administrator has disabled public write access.

Weibull distribution parameters 9 years 7 months ago #14

Hi Stefan,

thank you very much for so prompt reply.

Is the theory lying behind calculating the shape and scale parameters using the mean and pRemainPromille confidential, or can be found anywhere in the literature? I've looked into a number of archives, but found nothing.

Best regards,
Piotr Dziurzanski
The administrator has disabled public write access.

Weibull distribution parameters 9 years 7 months ago #15

  • schste
  • schste's Avatar
  • OFFLINE
  • AMALTHEA Developer
  • Posts: 5
  • Karma: 2
Hello Piotr,

there should be several publicly available sources for the parameter calculation available.

I will do some more research and try to provide you with some literature references.

Thank you a lot for your patience!

Kind regards,
Stefan Schmidhuber
Last Edit: 9 years 7 months ago by schste.
The administrator has disabled public write access.

Weibull distribution parameters 9 years 7 months ago #16

Hello Stefan,

your fast answers are deeply appreciated!

Since, according the Amalthea documentation (Common model section), it seems that Weibull distributions can be described with typical parameters (kappa and lambda) as well, it could be beneficial to provide the attached benchmarks (e.g. Democar) with these information as well in future releases. It would facilitate probabilistic analysis of response time using Amalthea.

Best regards,
Piotr Dziurzanski
The administrator has disabled public write access.

Weibull distribution parameters 9 years 7 months ago #17

  • schste
  • schste's Avatar
  • OFFLINE
  • AMALTHEA Developer
  • Posts: 5
  • Karma: 2
Hello Piotr,

yes the Weibull distribution can alternatively be modelled using the shape (kappa) and scale (lambda) parameters in AMALTHEA.

I found the following Master's Thesis titled "Parameter Estimation for the Two-Parameter Weibull Distribution" which might be quite helpful. You can access it using the following link: contentdm.lib.byu.edu/cdm/ref/collection/ETD/id/2543
I also got the hint for the following additional references:
www.codeproject.com/Articles/56371/Findi...on-Parameters-from-P
www.johndcook.com/quantiles_parameters.pdf

We will use your input to improve the documentation in a next step.

Kind regards,
Stefan Schmidhuber
Last Edit: 9 years 7 months ago by schste. Reason: Additional information
The administrator has disabled public write access.

Weibull distribution parameters 9 years 7 months ago #18

Hello Stefan,

you are extremely helpful! The paper by John D. Cook, together with the provided software implementation should finish the topic, but let's look at the Amalthea system:

<deviation xmi:id="_HdClXAZ5EeSiF4A9B43Urw">
          <lowerBound xsi:type="common:LongObject" xmi:id="_HdClXQZ5EeSiF4A9B43Urw" value="220"/>
          <upperBound xsi:type="common:LongObject" xmi:id="_HdClXgZ5EeSiF4A9B43Urw" value="1476"/>
          <distribution xsi:type="common:WeibullEstimators" xmi:id="_HdClXwZ5EeSiF4A9B43Urw" pRemainPromille="0.005">
            <mean xsi:type="common:LongObject" xmi:id="_HdClYAZ5EeSiF4A9B43Urw" value="432"/>
          </distribution>
        </deviation>


We need values x1, x2, p1, p2 such that:
P(X < x1) = p1,
P(X < x2) = p2.


As you've written, pRemainPromille is a value of the survival function for x=upperBound. I also assume that the probability of x<lowerBound is very low.

So, for example:

x1=220 //lowerBound
p1=0.001 //an arbitrary low probability value
x2=1476 //upperBound
p2=0.995 //1-pRemainPromille

Then:
gamma=(log(-log(1-p2))-log(-log(1-p1)))/(log(x2)-log(x1))=4.5048 //shape parameter
beta=x1/(-log(1-p1))^(1/gamma)=1.0194e+03 //scale parameter

The mean value for this Weibull distribution is about 930, whereas in the quoted Amalthea extract it is equal to 432. To obtain so low value, I'd have to substitute 0.27 for p1, a rather large value as for a lower bound.

Despite this inconsistency (provided that I haven't done any stupid mistake), I'm finding the technique quite useful for my purpose. Thank you once again.

Best regards,
Piotr Dziurzanski
The administrator has disabled public write access.

Weibull distribution parameters 9 years 7 months ago #19

  • schste
  • schste's Avatar
  • OFFLINE
  • AMALTHEA Developer
  • Posts: 5
  • Karma: 2
Hello Piotr,

while I could not find any obvious mistake in your calculation, the following could explain why you had to substitute p1 which such a high value:

The Weibull distribution is only defined for positive values so that P(x <= 0) = 0 (en.wikipedia.org/wiki/Weibull_distribution).
This issue can be resolved by shifting the whole distribution to the left, i.e. subtracting the lowerBound from the mean and the upperBound.
You then calculate the shape and scale parameters for the shifted distribution.
After that you add the lowerBound to each sampled value.

However with x1 = 0 and p1 = 0, the formula won't work anymore. An obvious choice would be x1 = mean but we don't know the probability here.

My advise is to modify John D. Cook's iterative approach of calculating the parameters of the gamma distribution for the Weibull distribution
(www.codeproject.com/Articles/56371/Findi...on-Parameters-from-P).

If I recall correctly, I used a similar iterative approach some time ago:
1) Use a senseful starting value for shape
2) mean = scale * gamma(1 + 1 / shape), solve for scale (en.wikipedia.org/wiki/Weibull_distribution)
3) check if P(x = upperBound) equals pRemainPromille to a satisfactory degree
(using the current scale and shape value from step 2)
4) if not modify shape like John D. Cook (multiply shape with 2 or divide shape by 2) and go to step 2)


Kind regards,
Stefan Schmidhuber
Last Edit: 9 years 7 months ago by schste. Reason: Additional information
The administrator has disabled public write access.
  • Page:
  • 1
  • 2
Time to create page: 0.097 seconds