Answer:
Figure attached. See explanation below
Step-by-step explanation:
Previous concepts
The binomial distribution is a "DISCRETE probability distribution that summarizes the probability that a value will take one of two independent values under a given set of parameters. The assumptions for the binomial distribution are that there is only one outcome for each trial, each trial has the same probability of success, and each trial is mutually exclusive, or independent of each other".
Solution to the problem
Let X the random variable of interest "number of voters polled who prefer Candidate A", on this case we now that:
The probability mass function for the Binomial distribution is given as:
Where (nCx) means combinatory and it's given by this formula:
We can create the cumulative distribution function with the following R code:
> x<-seq(0,5,1)
> y<-dbinom(x,5,p=0.617)
> plot(x,y,type = "h", main="PMF function") # the pmf function
> x= rbinom(n=10000,5, 0.617)
> P= ecdf(x)
> plot(P) # The cdf function