Equation: get a line over the X to signify mean/average

16,957 views
Skip to first unread message

PanDemic

unread,
May 1, 2007, 10:50:18 AM5/1/07
to LaTeX Users Group
Hi,

I need to get a line over the X to signify that the variable is an
average/mean value.

Currently I have this, but the two x's are small, and look bad next to
the 1 and 2:

\begin{equation}
U={{\over{x}}_1 - {\over{x}}_2 \over{ \sqrt{ {s^2_1 \over{n_1}} +
{s^2_1 \over{n_1}} }}}
\end{equation}

PanDemic

unread,
May 1, 2007, 10:53:02 AM5/1/07
to LaTeX Users Group
\bar x is the solution.

Pan

Henrique Castro

unread,
May 1, 2007, 11:28:38 AM5/1/07
to latex...@googlegroups.com
PanDemic wrote:
> \bar x is the solution.

I recomend \overline{x}.
HC

PJ

unread,
May 1, 2007, 3:19:57 PM5/1/07
to LaTeX Users Group
Yes, \overline{x} is the prefered solution.

In fact, {\over{x}} creates a fraction with nothing in the numerator
and "x" in the denominator (E.g., {1\over2} writes one half). Anyway,
\over is an obsolete command, you should use \frac{1}{2} for
typesetting fractions.

PJ.

Flamel

unread,
May 2, 2007, 8:24:54 AM5/2/07
to LaTeX Users Group
Hi PanDemic,

A better solution is to use \frac{}{}

\begin{equation}
U= \frac{\bar{x}_1 -\bar{x}_2}{\sqrt{\frac{s^2_1}{n_1}+\frac{s^2_1}
{n_1}}}
\end{equation}

Flamel

unread,
May 2, 2007, 8:27:13 AM5/2/07
to LaTeX Users Group
Hi PanDemic,

I thimk it is better to use \frac{}{} and \bar{} instead of \over{}.
In this case it looks like as you want.

\begin{equation}
U= \frac{\bar{x}_1 - \bar{x}_2}{\sqrt{\frac{s^2_1}{n_1}+
\frac{s^2_1}{n_1}}}
\end{equation}

Flamel

On May 1, 10:50 am, PanDemic <johanbasb...@hotmail.com> wrote:

Reply all
Reply to author
Forward
0 new messages