normal-distribution-z.tex 3.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. \documentclass[a4paper]{article}
  2. \usepackage[margin=20mm]{geometry}
  3. \usepackage[english]{babel}
  4. \usepackage[utf8]{inputenc}
  5. \usepackage{amssymb,amsmath}
  6. \usepackage{slashbox}
  7. \usepackage{booktabs}
  8. \usepackage[table,x11names]{xcolor}
  9. \usepackage{pgfplots}
  10. \setlength{\intextsep}{1pt}
  11. \begin{document}
  12. \pagenumbering{gobble}
  13. \section*{Percent point function (PPF) of the normal distribution}
  14. \pgfmathdeclarefunction{gauss}{3}{%
  15. \pgfmathparse{1/(#3*sqrt(2*pi))*exp(-((#1-#2)^2)/(2*#3^2))}%
  16. }
  17. \begin{figure}[!h]
  18. \centering
  19. \begin{tikzpicture}
  20. \begin{axis}[
  21. no markers,
  22. domain=0:6,
  23. samples=100,
  24. ymin=0,
  25. axis lines*=left,
  26. xlabel=$x$,
  27. every axis y label/.style={at=(current axis.above origin),anchor=south},
  28. every axis x label/.style={at=(current axis.right of origin),anchor=west},
  29. height=4cm,
  30. width=12cm,
  31. xtick=\empty,
  32. ytick=\empty,
  33. enlargelimits=false,
  34. clip=false,
  35. axis on top,
  36. grid = major,
  37. hide y axis
  38. ]
  39. \addplot [very thick,cyan!50!black] {gauss(x, 3, 1)};
  40. \pgfmathsetmacro\valueA{gauss(1,3,1)}
  41. \pgfmathsetmacro\valueB{gauss(2,3,1)}
  42. \draw [gray] (axis cs:1,0) -- (axis cs:1,\valueA)
  43. (axis cs:5,0) -- (axis cs:5,\valueA);
  44. \draw [gray] (axis cs:2,0) -- (axis cs:2,\valueB)
  45. (axis cs:4,0) -- (axis cs:4,\valueB);
  46. \draw [yshift=1.4cm, latex-latex](axis cs:2, 0) -- node [fill=white] {$0.683$} (axis cs:4, 0);
  47. \draw [yshift=0.3cm, latex-latex](axis cs:1, 0) -- node [fill=white] {$0.954$} (axis cs:5, 0);
  48. \node[below] at (axis cs:1, 0) {$\mu - 2\sigma$};
  49. \node[below] at (axis cs:2, 0) {$\mu - \sigma$};
  50. \node[below] at (axis cs:3, 0) {$\mu$};
  51. \end{axis}
  52. \end{tikzpicture}
  53. \end{figure}
  54. \begin{table}[!h]
  55. \centering
  56. \begin{tabular}{c|ccccc|ccccc}
  57. \toprule
  58. \backslashbox{$x$}{$\Delta x$} & \textbf{0.00} & \textbf{0.01} & \textbf{0.02} & \textbf{0.03} & \textbf{0.04} & \textbf{0.05} & \textbf{0.06} & \textbf{0.07} & \textbf{0.08} & \textbf{0.09} \\\midrule
  59. \textbf{0.0} & -inf & -2.3263 & -2.0537 & -1.8808 & -1.7507 & -1.6449 & -1.5548 & -1.4758 & -1.4051 & -1.3408\\
  60. \textbf{0.1} & -1.2816 & -1.2265 & -1.1750 & -1.1264 & -1.0803 & -1.0364 & -0.9945 & -0.9542 & -0.9154 & -0.8779\\
  61. \textbf{0.2} & -0.8416 & -0.8064 & -0.7722 & -0.7388 & -0.7063 & -0.6745 & -0.6433 & -0.6128 & -0.5828 & -0.5534\\
  62. \textbf{0.3} & -0.5244 & -0.4959 & -0.4677 & -0.4399 & -0.4125 & -0.3853 & -0.3585 & -0.3319 & -0.3055 & -0.2793\\
  63. \textbf{0.4} & -0.2533 & -0.2275 & -0.2019 & -0.1764 & -0.1510 & -0.1257 & -0.1004 & -0.0753 & -0.0502 & -0.0251\\
  64. \textbf{0.5} & 0.0000 & 0.0251 & 0.0502 & 0.0753 & 0.1004 & 0.1257 & 0.1510 & 0.1764 & 0.2019 & 0.2275\\
  65. \textbf{0.6} & 0.2533 & 0.2793 & 0.3055 & 0.3319 & 0.3585 & 0.3853 & 0.4125 & 0.4399 & 0.4677 & 0.4959\\
  66. \textbf{0.7} & 0.5244 & 0.5534 & 0.5828 & 0.6128 & 0.6433 & 0.6745 & 0.7063 & 0.7388 & 0.7722 & 0.8064\\
  67. \textbf{0.8} & 0.8416 & 0.8779 & 0.9154 & 0.9542 & 0.9945 & 1.0364 & 1.0803 & 1.1264 & 1.1750 & 1.2265\\
  68. \textbf{0.9} & 1.2816 & 1.3408 & 1.4051 & 1.4758 & 1.5548 & 1.6449 & 1.7507 & 1.8808 & 2.0537 & 2.3263\\
  69. \bottomrule
  70. \end{tabular}
  71. \caption{Approximations of $\Phi_{0;1}^{-1}(x + \Delta x)$}
  72. \end{table}
  73. \begin{align*}
  74. \Phi_{0;1}(x) &= \frac{1}{\sqrt{2 \pi}} \int_{-\infty}^{x} e^{- t^2 / 2} \mathrm{d} t &
  75. \Phi_{0;1}(1.65) &\approx 0.9505\\
  76. \Phi_{\mu; \sigma^2}(x) &= \Phi_{0;1} \left (\frac{x-\mu}{\sigma} \right ) &
  77. \Phi_{0;1}(-x) &= 1 - \Phi_{0;1}(x)\\
  78. z_\alpha &= \Phi_{0;1}^{-1}(1-\alpha)
  79. \end{align*}
  80. \end{document}