Math & ScienceExpress Inequality compactly

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
olegkomarov
Posts: 10
Joined: Tue Jul 26, 2011 4:24 am

Express Inequality compactly

Post by olegkomarov »

For the inequality to follow I would like to receive:
  • general feedback (could it be written more elegantly?)
  • is it possible to reformulate the inequality in a compact way in order to avoid the \wedge ?
The code:

Code: Select all

\documentclass{article}
\usepackage{amssymb,amsmath}

\providecommand{\abs}[1]{\lvert#1\rvert}

\begin{document}

Consider $\lbrace p_i \rbrace^N_{i=1}$ a time series of prices. We identify outliers with
	\begin{equation}\label{eq01}
		\abs{p_i - \overline{p}_{i}(k^-)} > \max \lbrace 3s_i(k),\gamma \rbrace 
		\quad \wedge \quad \abs{p_i - \overline{p}_{i}(k^+)} > \max \lbrace 3s_i(k),\gamma \rbrace
	\end{equation}
where $\overline{p}_{i}(k^-)$, $\overline{p}_{i}(k^+)$ denote the sample means on the $k/2$ observations respectively before and after $i$ 	and $s_i(k)$ is the standard deviation on the whole neigborhood. Finally, $\gamma$ is the granularity parameter.

\end{document}
Last edited by olegkomarov on Tue Jul 26, 2011 9:42 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Express Inequality compactly

Post by localghost »

I have no idea how to avoid the \wedge since it is a fixed part of this expression. A more elegant way to typeset it could be split it into two lines.

Code: Select all

\documentclass[11pt]{article}
\usepackage[T1]{fontenc}
\usepackage{mathtools}    % loads »amsmath«
\usepackage{xfrac}
\usepackage{fix-cm}

\DeclarePairedDelimiter{\abs}{\lvert}{\rvert}

\begin{document}
  Consider $\{p_i\}^N_{i=1}$ a time series of prices. We identify outliers with
  \begin{equation}\label{eqn:outliers}
    \begin{aligned}
      \abs{p_i-\bar{p}_{i}(k^-)} &> \max\{3s_i(k),\gamma\} \\
      \wedge\quad\abs{p_i-\bar{p}_i(k^+)} &> \max\{3s_i(k),\gamma\}
    \end{aligned}
  \end{equation}
  where $\bar{p}_{i}(k^-)$, $\bar{p}_{i}(k^+)$ denote the sample means on the $\sfrac{k}{2}$ observations respectively before and after $i$ and $s_i(k)$ is the standard deviation on the whole neigborhood. Finally, $\gamma$ is the granularity parameter.
\end{document}
I added some packages for improved typesetting. Study their manual for details.


Best regards and welcome to the board
Thorsten
olegkomarov
Posts: 10
Joined: Tue Jul 26, 2011 4:24 am

Express Inequality compactly

Post by olegkomarov »

localghost wrote:I have no idea how to avoid the \wedge since it is a fixed part of this expression.
I was thinking to compress the ^- and ^+ into a single ^\mp and then leave the description of the left and right neighborhood in the text, but I don't know if mathematically it would be elegant or even make sense.

On the other side I like your solution in two lines and thanks for the tips on the other packages.
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Express Inequality compactly

Post by localghost »

olegkomarov wrote: I was thinking to compress the ^- and ^+ into a single ^\mp and then leave the description of the left and right neighborhood in the text, but I don't know if mathematically it would be elegant or even make sense. […]
I think that is up to you. Perhaps you should take another book that describes similar stuff as some kind of guide. And finally an adept editor might be a better adviser.
Post Reply