# Why Output of mean of normal random variable created using rnorm equals to 10 is not 10 in manual calculation with R?

When we find the mean of normal random variable which is created with rnorm(“sample_size”,10) is not 10 because rnorm will create a random variable hence mean will be changed but as we increase the sample size the mean will become closer to 10.

Check out the Examples given below to understand the variation in the Outputs as the sample size increases.

## Example

The variation in the Outputs of mean of normal random variable created by using rnorm as the sample size increases is explained below −

mean(rnorm(100,mean=10))
mean(rnorm(100,mean=10))
mean(rnorm(100,mean=10))
mean(rnorm(100,mean=10))
mean(rnorm(100,mean=10))
mean(rnorm(100,mean=10))
mean(rnorm(100,mean=10))
mean(rnorm(1000,mean=10))
mean(rnorm(1000,mean=10))
mean(rnorm(1000,mean=10))
mean(rnorm(10000,mean=10))
mean(rnorm(10000,mean=10))
mean(rnorm(10000,mean=10))
mean(rnorm(10000,mean=10))
mean(rnorm(10000,mean=10))
mean(rnorm(100000,mean=10))
mean(rnorm(100000,mean=10))
mean(rnorm(100000,mean=10))
mean(rnorm(100000,mean=10))
mean(rnorm(100000,mean=10))
mean(rnorm(1000000,mean=10))
mean(rnorm(1000000,mean=10))
mean(rnorm(1000000,mean=10))
mean(rnorm(1000000,mean=10))
mean(rnorm(1000000,mean=10))
mean(rnorm(10000000,mean=10))
mean(rnorm(10000000,mean=10))
mean(rnorm(10000000,mean=10))
mean(rnorm(100000000,mean=10))

The Output is as follows

 10.13626
 9.892686
 9.938534
 9.918113
 10.12262
 10.05268
 10.06714
 9.953736
 10.02104
 9.973183
 9.994081
 10.00588
 9.983589
 10.00452
 10.00093
 9.999846
 9.999979
 9.996462
 10.00455
 10.00049
 9.999261
 9.998425
 9.999633
 10.00064
 9.998785
 10.00003
 9.999948
 9.99997