Question

In: Statistics and Probability

Plot the probability mass function (PMF) and the cumulative distribution function (CDF) of 3 random variables...

Plot the probability mass function (PMF) and the cumulative distribution function (CDF) of 3 random variables following (1) binomial distribution [p,n], (2) a geometric distribution [p], and (3) Poisson distribution [?]. You have to consider two sets of parameters per distribution which can be chosen arbitrarily. The following steps can be followed: Setp1: Establish two sets of parameters of the distribution: For Geometric and Poisson distributions take two values of p (p1 and p2) and take two values of [?], (?1 and ?2) respectively. For the binomial you should take two values of p and two values of n, first keep p fixed and change n, in the second keep n fixed and change p. Step 2: Generate the random variables (at least 10 values) [column 1] Step 3: Calculate the PMF [column 2] and CDF [column 3] Step 4: Plot the PMF and CDF in different graphics (It is recommended to combine the graphics while changing the parameters). Comment on how the parameters values affect the distribution.

Solutions

Expert Solution

ANSWER::

I am using R, I am providing the R code here, one can replicate and generate new graphs from this code by varying the repeatations and value of the parameters,

Here is the code for geomteric

##geometric
p1=0.5
p2=0.25

x1=rgeom(50,p1)
x2=rgeom(50,p2)

hist(x1,breaks=30,col="black", main="PMF of Geo(0.5)")
hist(x2,breaks=50,col="black", main="PMF of Geo(0.25)")


plot(ecdf(x1),main="CDF of Geo(0.5)")
plot(ecdf(x2),main="CDF of Geo(0.25)")

and here are the plots

Here as we see when lowered the parameter, we get much more values in the distribution as expected, the structire of the distribution however remains same

Now for Poisson

##Poisson
p1=3
p2=8

x1=rpois(50,p1)
x2=rpois(50,p2)
dev.new()
par(mfrow=c(1,2))

hist(x1,breaks=30,col="black", main="PMF of Pois(3)")
hist(x2,breaks=50,col="black", main="PMF of Pois(8)")

dev.new()
par(mfrow=c(1,2))

plot(ecdf(x1),main="CDF of Pois(3)")
plot(ecdf(x2),main="CDF of Pois(8)")

Now for the plots

Here also we see even though the bell shaped structure of the distribution remains same in both the cases. Increasing the parameter increases the spread of the distribution

Finally for Binomial

First we keep n constant and vary p

##binomial
p1=0.5
p2=0.25

n1=10
n2=20

x11=rbinom(100,n1,p1)
x12=rbinom(100,n1,p2)
dev.new()
par(mfrow=c(1,2))

hist(x11,breaks=40,col="black", main="PMF of Binom(10,0.5)")
hist(x12,breaks=40,col="black", main="PMF of Binom(10,0.25)")

dev.new()
par(mfrow=c(1,2))

plot(ecdf(x11),main="CDF of Binom(10,0.5)")
plot(ecdf(x12),main="CDF of Binom(10,0.25)")

The plots are

Interesting to see the change of structure in the two cases, although the domain remains same p1=0. gives symmetric distribution whereas p1=0.25 gives a skewed one

Now keep p=0.5 and vary n

p1=0.5
p2=0.25

n1=10
n2=50

x11=rbinom(100,n1,p1)
x12=rbinom(100,n2,p1)
dev.new()
par(mfrow=c(1,2))

hist(x11,breaks=40,col="black", main="PMF of Binom(10,0.5)")
hist(x12,breaks=40,col="black", main="PMF of Binom(50,0.5)")

dev.new()
par(mfrow=c(1,2))

plot(ecdf(x11),main="CDF of Binom(10,0.5)")
plot(ecdf(x12),main="CDF of Binom(50,0.5)")

The plots here are

NOTE:: I HOPE YOUR HAPPY WITH MY ANSWER....***PLEASE SUPPORT ME WITH YOUR RATING...

***PLEASE GIVE ME "LIKE"...ITS VERY IMPORTANT FOR ME NOW....PLEASE SUPPORT ME ....THANK YOU


Related Solutions

Plot the probability mass function (PMF) and the cumulative distribution function (CDF) of 3 random variables...
Plot the probability mass function (PMF) and the cumulative distribution function (CDF) of 3 random variables following (1) binomial distribution [p,n], (2) a geometric distribution [p], and (3) Poisson distribution [?]. You have to consider two sets of parameters per distribution which can be chosen arbitrarily. The following steps can be followed: Setp1: Establish two sets of parameters of the distribution: For Geometric and Poisson distributions take two values of p (p1 and p2) and take two values of [?],...
Plot the probability mass function (PMF) and the cumulative distribution function (CDF) of 3 random variables...
Plot the probability mass function (PMF) and the cumulative distribution function (CDF) of 3 random variables following (1) binomial distribution [p,n], (2) a geometric distribution [p], and (3) Poisson distribution [?]. You have to consider two sets of parameters per distribution which can be chosen arbitrarily. The following steps can be followed
using excel   Plot the probability mass function (PMF) and the cumulative distribution function (CDF) of 3...
using excel   Plot the probability mass function (PMF) and the cumulative distribution function (CDF) of 3 random variables following (1) binomial distribution [p,n], (2) a geometric distribution [p], and (3) Poisson distribution [?]. You have to consider two sets of parameters per distribution which can be chosen arbitrarily. The following steps can be followed: Setp1: Establish two sets of parameters of the distribution: For Geometric and Poisson distributions take two values of p (p1 and p2) and take two values...
Summarize key data distribution concepts including probability mass functions (PMF), probability density functions (PDF), and cumulative...
Summarize key data distribution concepts including probability mass functions (PMF), probability density functions (PDF), and cumulative distribution functions (CDF). Based on an organization or any organization you are most familiar with, provide an example of a PMF, an example of a PDF, and an example of a CDF, based on the type of data used in the organization. How would you summarize each of these to someone who is not familiar with each of these functions?
Summarize key data distribution concepts including probability mass functions (PMF), probability density functions (PDF), and cumulative...
Summarize key data distribution concepts including probability mass functions (PMF), probability density functions (PDF), and cumulative distribution functions (CDF). Based on your organization or any organization you are most familiar with, provide an example of a PMF, an example of a PDF, and an example of a CDF, based on the type of data used in the organization. How would you summarize each of these to someone who is not familiar with each of these functions?
Let X be the sum of rolling 2 dice. a) Plot the CDF and PMF of...
Let X be the sum of rolling 2 dice. a) Plot the CDF and PMF of X. b) Determine P(5 < X <=8 | x<=10) c) Determine the median, mean and variance of X d) Bonus: Compute the correlation between X and Y = the number on the first dice.
1) Define and elaborate upon the following: (a) A probability mass function (b) A cumulative distribution...
1) Define and elaborate upon the following: (a) A probability mass function (b) A cumulative distribution function (c) A discrete uniform distribution (d) A Bernoulli trial (e) A Binomial distribution
Given the cumulative distribution of an exponential random variable find: The probability density function Show that...
Given the cumulative distribution of an exponential random variable find: The probability density function Show that it is a valid probability function The moment generating function The Expected mean The variance
Given the cumulative distribution of a gamma random variable find: The probability density function Show that...
Given the cumulative distribution of a gamma random variable find: The probability density function Show that it is a valid probability function The moment generating function The Expected mean The variance
One paragraph notes on Continuous Random Variables - Cumulative Distribution Function has to be own words...
One paragraph notes on Continuous Random Variables - Cumulative Distribution Function has to be own words not copy paste..
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT