Modeling as a Binomial
N = 100 procedures, X = 13 deaths within 30 days, pi = .10 is the fixed probability of death.
P(X >= 13, | N = 100 pi=.1) = 1- P (X <=12 , 100, .1)
First, I solved for mean, variance, and standard deviation.
#Mean
100*.1
## [1] 10
#Variance
100*.1*.9
## [1] 9
#standard deviation
sqrt(100*.1*.9)
## [1] 3
The mean is 10, variance 9, and standard deviation 3. The hospitals rate of 13 deaths for every 100 cases is one standard deviation away from the mean, meaning it is within the expected rate of variance.
dbinom(13,100,.10)
## [1] 0.07430209
mybinom=dbinom(0:100, 100, .10)
plot(mybinom)
barplot(mybinom)
sum(mybinom[14:100])
## [1] 0.1981789
1-pbinom(12,100,.1)
## [1] 0.1981789
The probability of having 13 or more deaths is 0.1981789
Modeling as a Poisson
Lambda is 10 because it is the average rate of deaths (100*.1)
P(Y >= 13 | lambda = 10) = 1- P(Y <= 12 | lambda = 10)
sum(dpois(14:100,10))
## [1] 0.1355356
1-ppois(13,10)
## [1] 0.1355356
According to the Poisson distribution, the probability of having 13 or more deaths is 0.1355356.
mypois=dpois(0:100,10)
plot(mypois)
barplot(mypois)