Assume that the random variable X follows a binomial distribution with n = 5 and
ID: 3176045 • Letter: A
Question
Assume that the random variable X follows a binomial distribution with n = 5 and p = 0.5. (That is, equivalently, assume that X is the process of flipping a fair coin five times.) Using either R (with functions dbinom () or pbinom ()), or calculating by hand using the binomial PDF below, answer the following questions. Show your code or your typed math. f(x; n, p) = (n x)p^x (1 - p)^(n - x) What is the probability of X = 3? (Equivalently, what is the probability of obtaining 3 heads in 5 flips of that fair coin?) What is the probability of XExplanation / Answer
Result:
a).
Rcode:
px <- dbinom(3, 5, 0.5, log = FALSE)
px
R output
px <- dbinom(3, 5, 0.5, log = FALSE)
> px
[1] 0.3125
P( x=3) =0.3125
b).
R code
px <- dbinom(0, 5, 0.5, log = FALSE)+dbinom(1, 5, 0.5, log = FALSE)+dbinom(2, 5, 0.5, log = FALSE)
px
R output
px <- dbinom(0, 5, 0.5, log = FALSE)+dbinom(1, 5, 0.5, log = FALSE)+dbinom(2, 5, 0.5, log = FALSE)
> px
[1] 0.5
P( x <3) =0.5
c).
R code
px <- dbinom(4, 5, 0.5, log = FALSE)+dbinom(5, 5, 0.5, log = FALSE)
px
R output
px <- dbinom(4, 5, 0.5, log = FALSE)+dbinom(5, 5, 0.5, log = FALSE)
> px
[1] 0.1875
P( x 4) =0.1875
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.