I would like to define the letter \mathbb{E} as a summation symbol for averaged sum.

I've tried the following.

$$\E_{x\in X} f(x) = \frac{1}{|X|} \sum_{x\in X}f(x)$$

using newcommand

The problem with this is, that the symbol \mathbb{E} and \sum are not the same size. So then I tried these options (the code isn't pretty, I know that).

$$\underset{x \in X}{\scalebox{1.5}{$\E$}} f(x) = \frac{1}{|X|} \sum_{x \in X} f(x).$$

$$\mathop{\scalebox{1.5}{$\E$}}_{x \in X} f(x) = \frac{1}{|X|} \sum_{x\in X}f(x).$$

$$\scalebox{1.5}{$\E$}_{x\in X} f(x) = \frac{1}{|X|} \sum_{x\in X}f(x)$$ 


While here \mathbb{E} is larger, it is not aligned with summation symbol (at the bottom). Also f(x) is not in the middle of E, as is in for summation symbol.

I also tried the following.


declare math operator This would be a nice option but it does not accept mathfonts.

Any help would be appriciated, as I am struggling with this for some while now. These are just easy examples, I use average sum a lot in my thesis so I would like to have a nice looking symbol.

  • Welcome to TeX.SX! Unrelated to the question, but you shouldn't use $$...$$ for disaplyed math as explained here.
    – KersouMan
    Commented Jun 30, 2023 at 8:05
  • Unicode has a symbol for double struck sum (U+02140 \Bbbsum). You can use that as well if you desire. Commented Jun 30, 2023 at 9:52

1 Answer 1


You can use the code in https://tex.stackexchange.com/a/23436/4427 with a suitable coefficient.





\average_{x\in X}f(x)=\frac{1}{|X|}\sum_{x\in X}f(x)
\begin{center}% to show what happens inline
$\average_{x\in X}f(x)=\frac{1}{|X|}\sum_{x\in X}f(x)$


enter image description here

Never use $$ in LaTeX documents.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .