Weibull_plot application

Minh Tu Pham
14 Apr 2017

Weibull-plot application

This presentation give an introduction of an application “Weibull_plot” created with Shiny.

This application allows user to see how the shape of Weibull distribution changes when their parameters, i.e. shape parameter (a) and scale parameter (b), are modified.

The application is available at: https://minhtupham.shinyapps.io/Weibull_Plot/.

Why Weibull distribution

The Weibull distribution is one of the most widely used lifetime distributions in reliability engineering

The distribution has 2 parameters:

  • Shape parameter (a)
  • Scale parameter (b)

and the form of density function is: \( f(x) = (a/b) (x/b)^{(a-1)} exp(- (x/b)^{a}) \)

More information of Weibull: https://en.wikipedia.org/wiki/Weibull_distribution/

How the Weibull_plot work

  1. The user chose values for (a) and (b)
  2. The programe generates random 1000 values of Weibull with given a and b
  3. Make 2 plots:
  • Empirical cumulative distribution function

  • Frequency distribution function

Therefore by changing (a) and/or (b) the user will see how the shape of Weibull changes

Example from Weibull_plot with a = 1 and b = 1

sim <- rweibull(1000, 1, 1) # generates random 1000 values
par(mfrow=c(1,2))
plot(ecdf(sim),main="Empirical cumulative distribution", xlab = "x", ylab = "ECDF",cex.main=2, cex.lab=1.2) # ECDF plot
plot(density(sim),main="Frequency distribution",xlab = "x", ylab = "Frequency",cex.main=2, cex.lab=1.2, ylim=c(0,2.2)) # Frequency plot

plot of chunk unnamed-chunk-1