簡體   English   中英

嘗試在 R 中重新創建標准正態分布表

[英]Trying to recreate the standard normal distribution table in R

https://www.math.arizona.edu/~rsims/ma464/standardnormaltable.pdf

所以我需要重新創建標准正態分布的前 15 行和 8 列。

我希望我可以展示和嘗試,但是我不知道從哪里開始

我知道我需要 for 循環和 d、p、rnorm 函數之一

如果有人可以讓我開始或為我指明正確的方向,我將不勝感激

**x=seq(-3.9,-2.5,by=.1)
y=.01*(0:7)
f=matrix(NA,nrow=15,ncol=8)
for( i in 1:length(x)){
  for(j in 1:length(y)){
    f[i,j]=pnorm(x[i]-y[j])
  }
 }  
f
rounded=round(f,digits=5)
rownames(rounded)=seq(-3.9,-2.5,by=.1)
colnames(rounded)=seq(.00,.07,by=.01)
rounded**

這是我想要的答案

這就是使用您想要的任何部分制作標准普通表 N~(0,1) 的方式,在這種情況下它是 -3.9 到 -2.57

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM