Problem 3.21 Geometric Distribution

Married women: The 2010 American Community Survey estimates that 47.1% of women aged 15 years and over are married.
a) We randomly select three women between these ages. What is the probability that the third woman selected is the only one who is married?
Probability of married P= 47.1%
The events are independent and identically distributed, so we use the Geometric Distribution
Using formula for probability of first success in n trials

\[Probability=({ 1-p) }^{ n-1 }p\]

(1-.471)^(3-1)*0.471
## [1] 0.1318051
Using dgeom
dgeom(2, 0.471)
## [1] 0.1318051
Note that in the R function dgeom, we have to input (k-1) and not k as input
b) What is the probability that all three randomly selected women are married?
Assuming idependence,

\[Probability(all 3 married)=Probability(married)*Probablity(married)*Probability(married)\]

0.471^3
## [1] 0.1044871
c)On average, how many women would you expect to sample before selecting a married woman?

\[\mu =\frac { 1 }{ p }\]

1/0.471
## [1] 2.123142
We would expect to select 2.12 women

\[\sigma =\sqrt { \frac { 1-p }{ { p }^{ 2 } } } \]

sqrt((1-.471)/.471^2)
## [1] 1.544212
##Standard Deviation is 1.54
d) If the proportion of married women was actually 30%, how many women would you expect to sample before selecting a married woman? What is the standard deviation?
Using the formula in part (c)
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
e) Based on your answers to part c and d, how does decreasing the probability of an event affect the mean and standard deviation of wait time until success?
Decreasing the probability of an event increases the mean of the wait time and the standard deviation of the wait time.
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")