02.07.2013 Views

现代统计图形 - 科学网—博客

现代统计图形 - 科学网—博客

现代统计图形 - 科学网—博客

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

164 附录 B 作图技巧<br />

1 > # 本代码为“伪代码”,下图由pgfSweave生成<br />

2 > plot(seq(-3, 3, 0.1), dnorm(seq(-3, 3, 0.1)), type = "l",<br />

3 + xlab = "x", ylab = expression(phi(x)))<br />

4 > text(-3, 0.37, adj = c(0, 1), expression(phi(x) ==<br />

5 + frac(1, sqrt(2 * pi)) ~ e^-frac(x^2, 2)), cex = 1.2)<br />

6 > arrows(-2, 0.27, -1.3, dnorm(-1.3) + 0.02)<br />

7 > abline(v = qnorm(0.95), lty = 2)<br />

8 > text(0, dnorm(qnorm(0.95)), expression(integral(phi(x) *<br />

9 + dx, -infinity, 1.65) %~~% 0.95))<br />

φ(x)<br />

0.0 0.1 0.2 0.3 0.4<br />

φ(x) = 1<br />

√ 2π exp(− x2<br />

2 )<br />

1.65<br />

φ(x)dx ≈ 0.95<br />

−∞<br />

-3 -2 -1 0 1 2 3<br />

图 B.1: 正态分布密度函数公式的表示<br />

x

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!