In: Statistics and Probability
Using RStudio
15. (9 pts) A particular basketball player has a season long free throw percentage of 55%. The player takes 7 free throws.
a) Explain why this is a binomial probability.
b) Create a table with the probability distribution.
c) Create the histogram for the probability distribution.
a) Yes it is binomial distribution because
i) Trials are fixed and independent
ii) probability of success in each trial is fixed i.e. 0.55
---------------------------------------------------------------------------------------------------------------------------
b)> y <- dbinom(x=0:7,size=7, prob= .55)
> y
[1] 0.003736695 0.031969498 0.117221491 0.238784520 0.291847746
0.214021680 0.087194018
[8] 0.015224352
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
# Create a sample of 50 numbers which are incremented by
1.
x <- seq(0,7,by = 1)
# Create the binomial distribution.
y <- dbinom(x,7,0.55)
# Give the chart file a name.
png(file = "dbinom.png")
# Plot the graph for this sample.
plot(x,y)
# Save the file.
dev.off()