Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Experiment -3
Name – Tanmay Daga
Reg. No. – 18BME0829
1. It is known that probability of an item produced by a certain machine will be defective is 0.05.
If the produced items are sent to the market in packets of 20, then write down the R code to find
the number of packets containing at least, exactly and at most 2 defective items in a consignment
of 1000 packets.
ANS-
Np = lambda = 20*.05=1
i) Atleast 2 defective
Ans- 1-P(x=1)-P(x=0)
1 - dpois(x=0,lambda=1) - dpois(x=1,lambda=1)
[1] 0.2642411
ii)Exactly 2 defective
ans- P(x=2)
dpois(x=2,lambda=1)
[1] 0.1839397
ans – P(x=0)+P(x=1)+P(x=2)
[1] 0.9196986
2. A car hire firm has 2 cars which it hires out day by day. The number of demands for a car on
each day follows a Poisson distribution with mean 1.5. Write down the R code to compute the
proportion of days on which
ANS - P(x=0)
dpois(x=0,lambda=1.5)
[1] 0.2231302
Ans – P(x=0)+P(x=1)
dpois(x=0,lambda=1.5)+dpois(x=1,lambda=1.5)
[1] 0.5578254
[1] 0.1911532
3. The local corporation authorities in a certain city install 10,000 electric lamps in the streets of
the city with the assumption that the life of lamps is normally distributed. If these lamps have an
average life of 1,000 burning hours with a standard deviation of 200 hours, then write down the
R code to calculate the number of lamps might be expected to fail in the first 800 burning hours
and also the number of lamps might be expected to fail between 800 and 1,200 burning hours.
Ans –
1 P(X=<800)
pnorm(800,1000,200)
[1] 0.1586553
2 P(800<=P<=1200)
pnorm(1200,1000,200)- pnorm(800,1000,200)
[1] 0.6826895
4. Find the following and plot the graph (Assume it’s a standard normal distribution
i)P(0.8=<Z=<1.5)
[1] 0.1450482
> plot.new()
> curve(dnorm, xlim = c(-3, 3), ylim = c(0, 0.5), xlab = "z", ylab="f(z)")
pnorm(2)
[1] 0.9772499
> plot.new()
> curve(dnorm, xlim = c(-3, 3), ylim = c(0, 0.5), xlab = "z", ylab="f(z)")
>z=2
iii) P(z>1)
> 1 - pnorm(1)
[1] 0.1586553
> plot.new()
> curve(dnorm, xlim = c(-3, 3), ylim = c(0, 0.5), xlab = "z", ylab="f(z)")
>z=1
1) P(38<x<46)
> plot(x,y)
P(82<x<94)
P(62<x<86)