JavaScript 中的 ZTEST函数

首页 / JavaScript入门教程 / JavaScript 中的 ZTEST函数

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

Notes

  • 当不省略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。

Example

ZTEST Function

祝学习愉快!(内容编辑有误?请选中要编辑内容 -> 右键 -> 修改 -> 提交!)

技术教程推荐

10x程序员工作法 -〔郑晔〕

Service Mesh实战 -〔马若飞〕

如何看懂一幅画 -〔罗桂霞〕

重学线性代数 -〔朱维刚〕

讲好故事 -〔涵柏〕

手把手带你搭建秒杀系统 -〔佘志东〕

Go进阶 · 分布式爬虫实战 -〔郑建勋〕

Dubbo源码剖析与实战 -〔何辉〕

AI大模型之美 -〔徐文浩〕

好记忆不如烂笔头。留下您的足迹吧 :)