这些问题扩展起来都不简单的。水平有限,做最简单的想法。
假设水源没有被污染的情况下,一个人发生腹泻的概率是0.1。每个人都是独立的,所以把这个看成一个伯努利分布p=0.1,做假设检验,p是不等于0.1,大概等于0.7,所以认为水源被污染了。
> binom.test(10,14,0.1,alternative='g')
Exact binomial test
data: 10 and 14
number of successes = 10, number of trials = 14, p-value = 6.84e-08
alternative hypothesis: true probability of success is greater than 0.1
95 percent confidence interval:
0.4599946 1.0000000
sample estimates:
probability of success
0.7142857
个人感觉有点足,因为离水源远的地方喝到受污染的水而腹泻的概率是比离水源近的地方低的。而且这里没有用到抽样的理论。欢迎高手赐教。