+ - 0:00:00
Notes for current slide
Notes for next slide

Simulation of Normal Distribution

National Taipei University

Andy Yeh

2022-06-22

1

Introduction

Normal distribution shows everywhere in our life. For observing what the values my emerge in our real world, I simulation 100 samples from N(0, 1) and get 100 pairs from bivariate normal distribution with the mean vector (0, 0) as well as covariance identity matrix. Then, visualize these data points by ggplot packages. Here is my code.

Normal samples

Normal graph

Bivariate samples

Bivariate graph

2

Normal Samples

  • show 5 of 100 samples
print(normalSamples[1:5])
## [1] 0.33631074 -0.03944977 0.62006680 -2.02877404 -0.91322833
3

Normal Graph

Although normal distribution is symmetric, it doesn't mean our sample must be falls apart from x =0 equal. As we see in this graph, this distribution is slightly skew.

4

Bivariate Samples

  • show 5 of 100 samples
print(bivariateSample[1:5,])
## [,1] [,2]
## [1,] 0.1813740 -0.7435546
## [2,] -0.9353029 0.1407214
## [3,] 0.9438925 -0.3515571
## [4,] -1.3254220 0.9775177
## [5,] 0.4904515 -0.2487180
5

Bivariate Graph

This setting of bivariate normal distribution makes the 1000 points easily center at the coordinate (0, 0) and the dispersion of y axis 0 is similar to that of x axis. In this graph, the sample has verify this think.

6

Introduction

Normal distribution shows everywhere in our life. For observing what the values my emerge in our real world, I simulation 100 samples from N(0, 1) and get 100 pairs from bivariate normal distribution with the mean vector (0, 0) as well as covariance identity matrix. Then, visualize these data points by ggplot packages. Here is my code.

Normal samples

Normal graph

Bivariate samples

Bivariate graph

2
Paused

Help

Keyboard shortcuts

, , Pg Up, k Go to previous slide
, , Pg Dn, Space, j Go to next slide
Home Go to first slide
End Go to last slide
Number + Return Go to specific slide
b / m / f Toggle blackout / mirrored / fullscreen mode
c Clone slideshow
p Toggle presenter mode
t Restart the presentation timer
?, h Toggle this help
Esc Back to slideshow