Normal Distribution in LaTeX (\mathcal{N}(\mu, \sigma^2))
- LaTeX command
\mathcal{N}(\mu, \sigma^2)- Package
- No package needed: built into LaTeX
- Mode
- Math mode only
Where it is used
Normal (Gaussian) distribution with mean mu and variance sigma squared.
Write X \sim \mathcal{N}(\mu, \sigma^2) to state that X is normally distributed; the second parameter is the variance, not the standard deviation, a frequent source of confusion when reading software documentation. The multivariate form is \mathcal{N}(\boldsymbol{\mu}, \Sigma) with a covariance matrix. \mathcal gives the script N and works only on capital letters. The density \frac{1}{\sqrt{2\pi\sigma^2}} e^{-(x-\mu)^2/(2\sigma^2)} often follows in a display. The standard normal is \mathcal{N}(0, 1), and its cumulative distribution function is usually written \Phi.
Minimal compilable example
Paste this into an empty .tex file and compile it with pdfLaTeX, XeLaTeX or LuaLaTeX.
\documentclass{article}
\begin{document}
Normal Distribution: $\mathcal{N}(\mu, \sigma^2)$
\[ X \sim \mathcal{N}(\mu, \sigma^2) \]
\end{document}Related symbols
- Perpendicular
\perp - Similar To
\sim - Independence symbol (double perp)
\perp\!\!\!\perp - Bar
\bar{x} - Conditional
\mid - Mu
\mu
Frequently asked questions
- How do I write Normal Distribution in LaTeX?
- Type \mathcal{N}(\mu, \sigma^2) in math mode, for example $X \sim \mathcal{N}(\mu, \sigma^2)$. It works in plain LaTeX without loading any package.
- Which package do I need for \mathcal{N}(\mu, \sigma^2)?
- None. \mathcal{N}(\mu, \sigma^2) is part of standard LaTeX, so it compiles with nothing in the preamble but the document class.
- Can I use \mathcal{N}(\mu, \sigma^2) in text mode, or only in math mode?
- Only in math mode. Outside $...$ LaTeX stops with "Missing $ inserted", so write $\mathcal{N}(\mu, \sigma^2)$ in running text.
أفضل محرر LaTeX بالذكاء الاصطناعي، بديل Overleaf
يساعد Octree الباحثين من أكثر من 15 جامعة على كتابة أوراق البحث بشكل أسرع باستخدام الذكاء الاصطناعي
- أنشئ رسوم TikZ جميلة باستخدام الذكاء الاصطناعي
- ارفع صورة وحولها إلى LaTeX بسلاسة
- احصل على مساعدة فورية في كتابة وتنسيق أوراق البحث