In: Math
a.
Here we are taking samples of two normal distribution with the same mean and different standard deviation.
data1 ~ N(5,10) and data2 ~ N(5,20)
and the data is as follows
> data1 <- rnorm(20,5,10)
> data2 <- rnorm(20,5,20)
> hist(data1)
> hist(data2)
> data1
[1] -14.1594520 -2.8567743 4.0020726 5.0485712 -1.4288060 4.1153539
17.3823061
[8] 3.3351271 4.4581816 -10.7527625 -0.3584677 7.5337611 1.0341276
-7.6230778
[15] 8.4608876 -6.2248454 5.9739155 2.8561372 10.6726384
19.2082070
> data2
[1] -27.7207000 2.6669421 -12.1278855 -36.4089068 -3.2887953
-11.7676573 8.3062198
[8] 8.8320770 -1.1073838 8.3325758 -0.6989467 24.3139753
-14.8585661 0.3552415
[15] 5.2751997 -17.3715020 -9.2753353 30.0987542 -34.5395722
47.1727001
b.
Here we are taking samples of two normal distribution with the different mean and same standard deviation.
data1 ~ N(15,5) and data2 ~ N(10,5)
and the data is as follows
data1 <- rnorm(20,15,5)
> data2 <- rnorm(20,10,5)
> hist(data1)
> hist(data2)
> data1
[1] 8.839760 16.676272 19.904197 16.375453
[5] 19.135349 10.804172 8.823600 5.251564
[9] 15.876402 18.467850 11.928616 8.947840
[13] 17.646653 17.692819 1.367342 17.655593
[17] 16.720890 17.693406 21.057683 21.289203
> data2
[1] 11.5368136 9.6833670 5.9658488
[4] 8.4530015 10.5477951 18.9525564
[7] 15.9885261 15.1161655 15.4226111
[10] 9.7654731 3.0236538 16.4022282
[13] 11.1879639 -0.6999328 5.2688426
[16] 15.2005260 15.2470598 3.6663033
[19] 15.0583669 10.2965091
c.
If the standard deviation of a sample is zero, we can say that the observation of the sample are identical to each other
d <- rnorm(10,5,0)
> d
[1] 5 5 5 5 5 5 5 5 5 5