User Tools

Site Tools


normal_distribution

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
normal_distribution [2019/09/24 13:04]
hkimscil
normal_distribution [2019/09/24 13:04] (current)
hkimscil
Line 32: Line 32:
 </​code>​ </​code>​
  
-<​code>​xseq<​-seq(-4,​4,​.01)+<​code>​ 
 +xseq<​-seq(-4,​4,​.01)
 y<​-2*xseq + rnorm(length(xseq),​0,​5.5) y<​-2*xseq + rnorm(length(xseq),​0,​5.5)
 hist(y, prob=TRUE, ylim=c(0,​.06),​ breaks=20) hist(y, prob=TRUE, ylim=c(0,​.06),​ breaks=20)
-curve(dnorm(x,​ mean(y), +curve(dnorm(x,​ mean(y), sd(y)), add=TRUE, col="​darkblue",​ lwd=2)
-  ​sd(y)), add=TRUE, ​ +
-  ​col="​darkblue",​ lwd=2)+
 </​code>​ </​code>​
  
normal_distribution.txt · Last modified: 2019/09/24 13:04 by hkimscil