Why this matters
Managers constantly ask "is this difference real?" Did the northern branch really have more late repayments, or is it noise? Did the new seed variety really yield more? Inference gives you an honest answer, and just as important, it stops you from announcing discoveries that vanish next month.
Confidence intervals
A sample estimate on its own hides its uncertainty. A confidence interval gives a range of plausible values for the true figure. Suppose 246 of 300 sampled farmers repaid an input loan on time, an estimate of 82 percent:
from statsmodels.stats.proportion import proportion_confint
low, high = proportion_confint(count=246, nobs=300,
method="wilson")
print(round(low, 3), round(high, 3))This prints 0.773 0.859. You would report: "We estimate 82 percent repay on time; a 95 percent confidence interval runs from about 77 to 86 percent." The 95 percent describes the method: if you repeated the sampling many times, about 95 in 100 intervals built this way would contain the true rate. It does not mean there is a 95 percent chance this particular interval is right, though in plain speech "we are fairly confident the true rate is in this range" is acceptable.
Wider intervals mean more uncertainty. Bigger samples give narrower intervals.