title: “DATA306_Assignment3”” author: Rachel Ciszewski” ## Fair Data date: “3/16/2022” output: html_document ## created X and Y

X<-rnorm(1000)
head(X)
## [1]  1.08275655 -1.88484461  0.67460908  0.06074508  0.26168608 -0.55387765
Y<-rnorm(1000)

Created Z

Z<-X+Y

Mean

mean<-mean(Z)
mean
## [1] 0.03016665

Standard Deviation

sd<-sd(Z)
sd
## [1] 1.438395

Normality Checking

Histogram<-hist(Z)

Histogram
## $breaks
##  [1] -6 -5 -4 -3 -2 -1  0  1  2  3  4  5
## 
## $counts
##  [1]   1   2  18  53 157 258 262 162  67  18   2
## 
## $density
##  [1] 0.001 0.002 0.018 0.053 0.157 0.258 0.262 0.162 0.067 0.018 0.002
## 
## $mids
##  [1] -5.5 -4.5 -3.5 -2.5 -1.5 -0.5  0.5  1.5  2.5  3.5  4.5
## 
## $xname
## [1] "Z"
## 
## $equidist
## [1] TRUE
## 
## attr(,"class")
## [1] "histogram"
library("car")
## Loading required package: carData
qqnorm(Z, pch = 1, frame = FALSE)
qqline(Z, col = "steelblue", lwd = 2)

qqPlot(Z)

## [1] 899 514

Yes we can clearly observe all data lies in the center so we can say that Z follows the normal distribution. All points are contained in the lines in QQ plot so Z is normal.