首页 > 解决方案 > 如何找到标准误差在正态分布中的特定数量的概率?

问题描述

我试图找到标准误差的概率等于或大于 0.01 的正态分布的 CLT(中心极限定理)近似值?

计算误差为 0.01 或更大的概率

鉴于:

N= 样本数为 100

X = 样本平均值为 0.51

SE = 我通过 sqrt(X * (1-X)/N) 计算了标准误差

然后我使用了这个pnorm()功能。请看下面的代码。当我运行编译器时,它给了我一个函数的参数错误pnorm()

R代码

# `N` is the number of people polled
N <-100

# `X` is the sample average
X <- 0.51

# `se` is the standard error of the sample average
se <- sqrt(X*(1-X)/N)

# Calculating the probability that the error is 0.01 or larger
1-(pnorm(0.01/se) - pnorm(-0.01/se))

当我运行代码时,编译器给我一个函数的参数错误pnorm()

标签: rprobability

解决方案


你的代码很好,这是我运行你的代码时得到的。没有错误。

> N <-100
> X <- 0.51
> se <- sqrt(X*(1-X)/N)
> 1-(pnorm(0.01/se) - pnorm(-0.01/se))
[1] 0.8414493

推荐阅读