ZTEST函数替代Excel 2010中的Z.TEST函数。
该函数返回z检验的单尾概率值。对于给定的假设总体均值$\mu_0 $,ZTEST返回样本均值大于数据集(数组)中观察值的平均值的概率,即观察到的样本均值。
ZTEST (array,x,[sigma])
Argument | 描述 | Required/Optional |
---|---|---|
Array | The array or range of data against which to test x. | Required |
X | The value to test. | Required |
Sigma |
总体(已知)标准偏差。 如果省略,则使用样本标准偏差。 |
Optional |
当不省略sigma时,ZTEST的计算如下-
$$ZTEST(array,\mu_0)= 1-NORMDIST((\bar {x}-\mu_0)/(sigma/\sqrt {n}))$$
或者,当省略sigma时-
$$ZTEST(array,\mu_0)= 1-NORMDIST((\bar {x}-\mu_0)/(s/\sqrt {n}))$$
哪里,
x是样本平均值AVERAGE(array),
s是样本标准差STDEV(array)。
n是样本COUNT(数组)中的观察次数。
ZTEST represents the probability that the sample mean would be greater than the observed value AVERAGE (array), when the underlying population mean is $mu_0$. From the symmetry of the Normal distribution, if AVERAGE (array) < $mu_0$, ZTEST will return a value greater than 0.5
当基础总体均值为$mu_0 $时,以下Excel公式可用于计算样本均值比$AVERAGE(array)更远离$mu_0 $(任一方向)的两尾概率-
= 2 * MIN(ZTEST(阵列,$mu_0 $,sigma),1-ZTEST(阵列,$mu_0 $,sigma))
如果数组为空,则ZTEST返回错误值#N/A。
祝学习愉快!(内容编辑有误?请选中要编辑内容 -> 右键 -> 修改 -> 提交!)