You are on page 1of 3

Central University of Rajasthan

Department of Statistics
Assignment No.

3.1

Assignment
Details

Finding the Binomial Distribution when the no. of trials = 10 and


Probability = 0.3.

Objective

We have to find Binomial Distribution from given parameter.

Description of
Data set

From the given parameter n=10 and p=0.3, we have to calculate


Probability Mass Function and Distribution Function by Binomial
Distribution.
R statistical software package

Statistical tool to
be used
Methodology

R commands

Date of Submission:

1) First we will define a function with parameter n, p and then in that


function we will use the formula = choose(n,x)*p^(x)*((1-p)^(nx).
2) Then by using plot() we will plot the graph of the p.m.f. of
binomial distribution.
n<-10
p<-0.3
bino<-function(n,p)
{
bin=choose(n,x)*p^(x)*((1-p)^(n-x))
return (bin)
}
bino
x<-c(0:n)
bino(10,0.3)
u<-bino(10,0.3)
plot(u)
n<-10
x<-c(0:n)
u<-bino(10,0.3)
plot(u)
m<-c(0:10)
plot(m,u)
cdf=0
for(i in 0:n)
{

Central University of Rajasthan


Department of Statistics
cdf=cdf+u[i+1]
cat(cdf, "\n\n")
}
Graphs

Results

P.M.F:P[X=0]= 0.0282475249
P[X=1]= 0.1210608210
P[X=2]= 0.23347444050
P[X=3]= 0.2668279320
P[X=4]= 0.2001209490
P[X=5]= 0.1029193452
P[X=6]= 0.0367569090
P[X=7]= 0.0090016920
P[X=8]= 0.0014467005
P[X=9]= 0.0001377810
P[X=10]= 0.0000059049

Central University of Rajasthan


Department of Statistics

C.D.F.:P[X=0]=0.02824752
P[X=1]=0.1493083
P[X=2]=0.3827828
P[X=3]=0.6496107
P[X=4]=0.8497317
P[X=5]=0.952651
P[X=6]=0.9894079
P[X=7]=0.9984096
P[X=8]=0.9998563
P[X=9]=0.9999941
P[X=10]=1
Conclusions

At P[X=3] the chance of occurrence of the event is maximum.


At P[X=10] the chance of occurrence of the event is minimum.
Graph of p.m.f. is left skewed.

You might also like