Answer:
Proportion of buildings in the city that have fire code violations: 10%
Uncertainty 0.3 = 30%
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:
where n is the sample size. So
and the uncertainty is the standard error SE