HW1-sta5166

HW1-sta5166 - "Histogram of...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Jaime Frade STA5166 HW1: Reproduce graphs from the lecture using R. Summary I stored x1 as a random standard normal variable to generate 1000. Each of the four plots listed below exhibit the characteristics of this random normal variable.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Summary : I obtained the following variance and summary statistics regarding quartiles. >var(x1) [1] 0.8780359 > summary(x1) Min. 1st Qu. Median Mean 3rd Qu. Max. -3.27900 -0.59400 -0.02774 0.01245 0.65280 3.52800 File name: HW1eda.txt x1<-rnorm(1000,0,1) eda1<-function(x){par(mfrow=c(2,2), oma=c(4,2,6,2), mar=c(5,5,4,2), hist(x,las=1, main =
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: &quot;Histogram of N(0,1)&quot;), boxplot(x,las=1, main = &quot;Boxplot of N(0,1)&quot;),iqr&lt;-summary(x)[5]-summary(x)[2], plot(density(x, width=2*iqr), xlab=&quot;x&quot;,ylab=&quot;y&quot;, type=&quot;l&quot;, las=1, main=&quot;Normal Probability Curve N(0,1)&quot;), qqnorm(x,las=1, main=&quot;Normal Probability Plot for x&quot; ),qqline(x),par(mfrow=c(2,2),oma=c(4,2,6,2),mar=c(5,5,4,2)), mtext(side=3,line=2,cex=1.2,outer=T, &quot;Figure 1. Exploratory Data Analysis Plots&quot; ))} eda1(x1) CODE &gt;source(&quot;C:/Documents and Settings/Jaime/Desktop/FALL07/STA5166/hw1eda1.txt&quot;) &gt;var(x1) &gt;summary(x1)...
View Full Document

Page1 / 2

HW1-sta5166 - &amp;amp;quot;Histogram of...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online