Answer:
Proportion of buildings in the city that have fire code violations: 10%
Uncertainty 0.3 = 30%
Step-by-step explanation:
This situation complies with a binomial model where p is the probability of finding a building having fire code violations and q=1-p
Since in random sample of 40 buildings chosen for inspection 4 of them are found to have fire code violations, the proportion is 4/40 = 0.1 or 10% and p=0.1 as well.
In a binomial model the standard deviation s is:
[tex]\large s=\sqrt{npq}[/tex]
where n is the sample size. So
[tex]\large s=\sqrt{40*0.1*0.9}=1.8974[/tex]
and the uncertainty is the standard error SE
[tex]\large SE=\frac{s}{\sqrt{n}}=\frac{1.8974}{\sqrt{40}}=0.3=30\%[/tex]