##Part I # A. Please explain each of the 3 distibutions (Normal, Binomial, and Poisson) in less than 4 sentences. Each of these distributions is used to describe a spread of data under investigation. A normal distribution is a bell-shaped curve where the mean and median are equal and it is symmetric with nearly all of the data within three standard deviations of the center. A binomial distribution describes the number of successes after n indendepent Bernoulli trials where there are two possible outcomes. Lastly a Poisson distribution provides a model of the number of events in a given time span, such as the number of bird sightings in a hour in a park.
Both the probability density function (pdf) and cumulative density function (cdf) are used on continuous random variables to provide information about the likelihood of an event happening. The pdf provides the probability of the outcome being within some interval of the continuous distribution, such as getting between 1 to 2 inches of snow on a winter day. The cdf on the other hand provides the probability of the outcome being less than or equal to some value, such as getting up to 5 inches of snow on a winter day. Given a normal distribution of height for college students, the pdf formula would provide useful information if we were looking for the number of students that were between 5’4” and 5’8” for instance.
The key parameters for a normal distribution are mean and standard deviation. In R, the dnorm function will assume default values of mean = 0 and sd = 1 if not declared. The key parameters for a binomial distribution are the probability of success and the number of trials. In R, the dbinom function requires the parameters to be declared. The key parameters for the Poisson distribution are the average event rate within the given time or space and a vector of non-negative quantiles. In R, the dpois fucntion requires each parameter to be declared.
Examples of a normal distribution include looking at heights of groups, SAT/ACT scores, or the quality of products produced. Examples of a binomial distribution include medical trials where a treatment is effective or not, winning the lottery, or contracting a disease or not. Examples of a Poisson distribution involve events happening in a given time or space, this could be customers in a store over an hour, number of defects in a product, or cars driving through an intersection.
# Number of trials
n <- 5
# Probability of success
p <- 0.6
# Generate values for x (number of successes)
x <- 0:n
# Calculate the probabilities for each value of x
probabilities <- dbinom(x = x,
size = n,
prob = p
)
# Plot the binomial distribution
barplot(height = probabilities,
names.arg = x,
col = "skyblue",
main = "Binomial Distribution",
xlab = "Number of Successes",
ylab = "Probability"
)
Let’s assume that a hospital’s neurosurgical team performed N procedures for in-brain bleeding last year. x of these procedures resulted in death within 30 days. If the national proportion for death in these cases is \(\pi\), then is there evidence to suggest that your hospital’s proportion of deaths is more extreme than the national proportion?
Pick your own values of N, x, and \(\pi\). x is necessarily less than or equal to N, and \(\pi\) is a fixed probability of success. The probability should be greater than or equal to x.
Let N = 100, x = 25, and \(\pi\) = .30
N <- 100
x <- 25
pi <- 0.3
choose(n=N, k=x)*pi^x*(1-pi)^(N-x)
## [1] 0.04955992
dbinom(x, N, pi)
## [1] 0.04955992
sum(dpois(x=1:24, lambda = 0.3*100))
## [1] 0.157242
The values are different as the value of N is not large, nor is the probability small. As N increases and \(\pi\) decreases they would converge.