\[Probability=({ 1-p) }^{ n-1 }p\]
(1-.471)^(3-1)*0.471
## [1] 0.1318051
dgeom(2, 0.471)
## [1] 0.1318051
\[Probability(all 3 married)=Probability(married)*Probablity(married)*Probability(married)\]
0.471^3
## [1] 0.1044871
\[\mu =\frac { 1 }{ p }\]
1/0.471
## [1] 2.123142
\[\sigma =\sqrt { \frac { 1-p }{ { p }^{ 2 } } } \]
sqrt((1-.471)/.471^2)
## [1] 1.544212
##Standard Deviation is 1.54
1/0.30
## [1] 3.333333
##We expect on average to sample 3.33 women before finding a married woman.
sqrt((1-.30)/.30^2)
## [1] 2.788867
##Standard deviation is 2.79
p<-c(0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9)
mu=1/p
par(mfrow=c(1,2))
barplot(mu, names.arg=p, main="Probability vs expected wait time", xlab="Probability", ylab="Expected wait time")
stdev=sqrt((1-p)/p^2)
barplot(stdev, names.arg=p, xlab="Probability", ylab="Standard Deviation", main= "Probability vs Standard Deviation")