I think you need to specify a probability distribution and then R can generate random samples from the distribution.
我愛鬼妹2020-03-31 11:29:16
how 🥺 please shed some insights, no need to write full codes.
算子代數2020-03-31 11:42:45
Let n, mu_0, s_0 be your sample size, sample mean and sample SD respectively.
Generate first n samples from, say, Normal(0, 1) distribution, call them {x_i}. Let mu and s be the sample mean and sample SD of {x_i} respectively. Then the sample mean and SD of {(x_i - mu) / s} would be 0 and 1 respectively. Finally let y_i = sqrt(s_0) (x_i - mu) / s + mu_0. Such {y_i} would have sample mean mu_0 and sample SD s_0.
算子代數2020-03-31 11:46:50
typo, it should be: y_i = s_0 (x_i - mu) / s + mu_0
as s_0 is SD
憤青一名2020-03-31 12:03:51
都想知,見到好多paper都話用R。
因為個lab冇人識coding,我就只識java javascript,目前都係用Java javascript implement d 有用的,但感覺好辛苦。