看板 Statistics 關於我們 聯絡資訊
※ 引述《plutos (唉!怎麼都讀不懂。)》之銘言: : The empirical rule states that approximately 95% of data from : a normal distribution with a mean of 0 and a standard deviation : of 1 will have an absolute value less than 2. Use the sum, rnorm : , ifelse and apply functions to find (1) the proportion of 1000 : random normal variables whose absolute value is less than 2. : Repeat 10 times and see how widely the results vary. : (2) Write it into a function called empirical(n,nrepeat,mean,sd,..) : 對於第二題一點頭緒也沒有請問有人可以指點一下嗎? : PS:手中沒有相關多餘的書,也想過了!想不出來上來求助大家的幫忙。 要完成第一題 我假設你應該進行了下列兩步驟: 第一步: 你須先寫一段程式 才能求出 the proportion of 1000 random normal variables whose absolute value is less than 2 第二步: 重複第一步中的程式十次 第二題就是要你寫一個function把第一題的第一步和第二步合在一起 用一個步驟即可完成 建議可用循環的指令: for () {} 來完成 若還是沒有頭緒 再問吧 (因為我也不知道你到底卡在哪裡阿) -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 218.175.112.238