119

What is the symbol for the normal density function in LaTeX?

7
  • 11
    When I went to look it up I realised that it is \mathcal{N}. Sorry.
    – asdf123
    Commented Dec 12, 2010 at 16:46
  • 9
    @asdf123: It would be nice if you just note the solution you found below as an answer and mark it as "accepted". This way everybody can see that the question is answered resp. closed and not open any more.
    – Stefan Kottwitz
    Commented Dec 12, 2010 at 16:58
  • 1
    For such things it's always worth to take a look at »Wikipedia«. Commented Dec 12, 2010 at 17:30
  • 4
    @asdfl123 @Thorsten ... and if you look under the edit tag in the Wikipedia you will see the actual LaTeX command!
    – yannisl
    Commented Dec 12, 2010 at 20:06
  • 3
    FWIW, LaTeX doesn't attach any particular meaning to symbols, so asking what symbol is used for a particular function is not a question about LaTeX, it's a question about math. Only once you know what the symbol looks like does it become a LaTeX question ("how do I create this glyph in LaTeX").
    – David Z
    Commented Dec 13, 2010 at 17:00

5 Answers 5

149

asdf123 wrote:

...I realised that it is \mathcal{N}.
55

From Wikipedia:

X ~ N(mu, sigma^2)

where code for the displayed equation is:

\[
  X \sim \mathcal{N}(\mu,\,\sigma^{2})\,.
\] 
1
  • 1
    What i really wanted was \sigma^2, not mathcal{N}, so thanks for writing the full form. Commented Oct 2, 2019 at 4:05
3
X \hookrightarrow  \mathcal{N}(\mu,\,\sigma^{2})

this one is better I think :p

3
  • 3
    Welcome to TeX.SX! Could you explain a bit, why? Always helpful:How do I write a good answer?
    – Bobyandbob
    Commented Nov 21, 2017 at 21:51
  • 1
    It's the most used in books
    – Farah
    Commented Nov 22, 2017 at 11:02
  • 1
    \mathcal{N} is standardly used for the normal distribution and is arguably more correct than just N, but I have not seen a single instance of \hookrightarrow being used for "distributed as". Have you?
    – Nagel
    Commented May 13, 2022 at 9:47
3

In this website or on Wikipedia (https://en.wikipedia.org/wiki/Normal_distribution) there are a large common of list of probability and statistics-symbols:

enter image description here

For Wikipedia click in edit and you can see the used code.

6
  • At this time, February 2022, the wikipedia page you link to appears to use \mathcal{N}, which looks different from the upright font you used in your table.
    – PatrickT
    Commented Feb 15, 2022 at 5:43
  • @PatrickT I have seen again the page of my link but I not see the \mathcal{N}. Where you have seen this apparence? I see the classic $N$. Bye.
    – Sebastiano
    Commented Feb 15, 2022 at 19:49
  • 1
    And by the way, I prefer upright, I'm not a big fan of \mathcal!
    – PatrickT
    Commented Feb 16, 2022 at 8:17
  • 1
    @PatrickT Ah but it not is wikipedia but in wikimedia :-). I prefer $N$ and not \mathcal.
    – Sebastiano
    Commented Feb 16, 2022 at 21:11
  • 2
    wikimedia is where wikipedia stores things like images. The \mathcal comes from the wikipedia page you cite, it's in several places, including where it has the Notation in the column on the rhs.
    – PatrickT
    Commented Feb 17, 2022 at 3:15
1

The above answer did not work for me. For that I used dollar sign before and after that and it did work like this;

\STATEx $\mathcal{N}$(\mu, $\sigma^2 $))$

This worked for me. I hope it may help others as well.

1
  • 2
    Welcome to the TeX.SE. Surely we can give you an answer: but this answer must be possibly where needed followed by a small compilable latex code where we can see your work. Please can you post a MinimalWorkingExample? What is \STATEx? How your code work?
    – Sebastiano
    Commented Jun 11, 2021 at 14:22

You must log in to answer this question.