In: Statistics and Probability
I'd like to have 30 random numbers generated which are distributed
a) exponentially
b) uniform
c) normal
d) binomial
e) Poisson
Would you please generate 30 random numbers regarding these distributions above, please?
Mean=3
Note:
Exponential Variates: Mean = 3 and Rate (lambda) = 1/3
6.12405091 1.56378689 0.58907049
3.72425456 0.53281157 5.40521743 1.22549739 0.78002833
1.44778654 4.00271708 0.12015778 0.31206877 0.16223254 5.08650530
0.47559074 2.14431983
0.03888910 0.78374765 1.90625097 1.85884847 2.27775082 0.07041744
2.87155559 0.32581550
0.52401560 3.24002486 1.31517530 1.58642555 1.51100128
6.23794154
Uniform Variates: Mean = 3 and Variance = 2 implies a = 0.5505 and b = 5.4495
3.9799577 1.3469375 2.6235133 2.3269012
2.7647163 1.3105756 3.5081283 2.6333551 4.6484019
4.1205721 3.6214546 5.1009984 0.6282884 4.9423345 3.5407816
4.0720791 1.6734096 2.3817502
2.8462531 2.4227601 4.9195090 2.6131532 1.9795015 5.2851279
1.6162147 2.0669622 1.6775543
4.1111315 3.6982137 2.0835242
Normal Variates: Mean = 3 and Variance = 2
0.30097653 1.39755639 3.67844996
1.94967500 2.80540596 2.45670503 6.08157267
2.91324234 4.90851393 2.29575358 2.37598274 4.58994742 4.00319100
2.89266819
1.92703111 4.17427228 3.38824334 2.30138067 2.77183187 3.40041563
2.60020459
2.77649700 0.39505529 -0.08442628 1.80187258 4.52287469 2.10877891
4.01711749
3.23014636 4.91806523
Binomial Variates: Mean =3 and Variance = 2 implies n = 9 and p = (1/3)
3 1 4 3 5 5 1 2 3 3 3 2 2 3 4 2 4 3 0 2 7 4 1 4 3 2 3 3 2 4
Poisson Variates: Mean = Variance = 3 ( I have taken this)
1 2 5 2 6 0 4 2 4 0 2 4 1 3 1 4 3 5 1 3 2 3 1 0 3 3 5 3 1 1
R- Code: