运行 ❯
获取您
自己的
网站
×
更改方向
更改主题,明暗
转到 Spaces
# Specify the sample occurences (x), the sample size (n), and the null-hypothesis claim (p) x <- 10 n <- 40 p <- 0.20 # Calculate the sample proportion p_hat = x/n # Calculate and print the test statistic (p_hat-p)/(sqrt((p*(1-p))/(n)))
[1] 0.7905694