• #5, First Floor, 4th Street Dr. Subbarayan Nagar Kodambakkam, Chennai-600 024 Landmark : Samiyar Madam
• pro@slogix.in
• +91- 81240 01111

#### Social List

##### How to implement the Weibull Distribution in R?
###### Description

To implement the weibull distribution using R programming.

#### Four main functions in weibull distribution:

dweibull(x, shape = , scale =) Gives density

pweibull(x, shape = , scale =) Gives distribution function

qweibull(p, shape = , scale =) Gives quantile fumction

rweibull(n, shape = , scale =)

Used to generate random deviates

x -- vector of quantiles

Scale -- Scale Parameter

Shape -- Shape Parameter

###### Sapmle Code

#Weibull Distribution

#dweibull
x<-seq(0,100,by=1)
y<-dweibull(x,shape = 3,scale=8)
plot(x,y,main=”dweibull plot”,col=”blue”)

#pweibull
y<-pweibull(x,shape=3,scale=10)
plot(x,y,main=”pweibull”,col=”red”)

#qweibull
y<-qweibull(p=0.4,shape = 2,scale = 2)
print(y)

#rweibull
x<-rweibull(n =20,shape = 4,scale = 4)
hist(x,col=275)