### Archive

Posts Tagged ‘LaTeX’

## College Statistics

Michael Feathers (@mfeathers) posted a link on twitter to a nice little statistics assignment.

If you would like to solve it yourselves, stop reading when you get to the mathematics, otherwise it will spoil your fun.

Enjoy

Currently a college senior, Jeremy has had a secret crush on Emma ever since the third grade. Two weeks ago, fearing that his feelings would forever go unrequited, he broke his silence and sent Emma a letter through Campus Mail, acknowledging his twelve/year secret romance.Now, fourteen agonizing days later, he has yet to receive a response. Hoping against hope, Jeremy and his fragile psyche are clinging to the possibility that someone’s letter was lost in the mail.

Assuming that:

1. Emma (who is actually secretly dating Jeremy’s father) has a 70% change of mailing a response if, in face, she had received the letter and
2. The Campus Post Office has a one in fifty change of losing any particular piece of mail,

what is the probability that Emma never received Jeremy’s confession of the heart?

Let $B$ represent the event that Jeremy did not receive a response; let $A_1$ and $A_2$ denote the events that Emma did and did not, respectively, receive, Jeremy’s letter. The objective is to find $P(A_2 | B)$.

Stop reading now, if you do not wish to see the proof. Not that it is very complicated, mind you, but try to extract that old knowledge from years back when you had statistics yourself.

From what we know about Emma’s behavior and the incompetence of the Campus Post Office,

$\displaystyle{P(A_1) = \frac{49}{50}, P(A_2) = \frac{1}{50}, P(B | A_2) = 1}$

Also,

$\displaystyle{P(B | A1) = P(\mbox{Jeremy receive no response} | \mbox{Emma received Jeremy's letter})}$

$\displaystyle{ = P[\mbox{Emma does not respond} \cup (\mbox{Emma responds} \cap \mbox{Post Office loses letter})]}$

$\displaystyle{ = P(\mbox{Emma does not respond}) + P(\mbox{letter is lost} | \mbox{Emma responds}) \times P(\mbox{Emma responds})}$

$\displaystyle{ = 0.30 + 0.70\frac{1}{50}}$

$\displaystyle{ = 0.314}$

Therefore,

$\displaystyle{ P(A_2 | B) = \frac{1\frac{1}{50}}{0.324\frac{49}{50} + 1\frac{1}{50}}}$

$\displaystyle{ = 0.061}$

Sadly, the magnitude of $P(A_2 | B)$ is not good news for Jeremy. If $P(A_2 | B) = 0.061$, it follows that Emma’s probability of having received the letter but not caring enough to respond was almost $94\%$. “Faint heart ne’er won fair lady,” but Jeremy would probaly be well/advised to direct his romantic intentions elsewhere.

Categories: Writing Tags:

## Pythagorean proof

I recently wrote a blog post on beautiful mathematics. Mathematics can be beautiful or pleasing in many ways, one of them being if the proof is elegant.

Apparently one of the theorems for which the greatest number of proofs exists is the Pythagorean theorem.

The theorem states that

In any right triangle, the area of the square whose side is the hypotenuse (the side opposite the right angle) is equal to the sum of the areas of the squares whose sides are the two legs (the two sides that meet at a right angle).

or

$\displaystyle{a^2 + b^2 = c^2}$

One of the more beautiful or elegant proofs is the one below.

Categories: Writing Tags:

## Playing with LaTeX

Just learned that the plug-in I use to format $\LaTeX$ has an option that lets you control the size of the formula when using displaystyle. Have to try it.

$\displaystyle{f = \frac{1}{2}a_0 + \sum_{n=1}^{\infty}\left\{a_n\cos nt + b_n \sin nt \right\}}$

with the coefficients

$\displaystyle{a_n = \frac{1}{\pi}\int_{-\pi}^\pi f(t) \cos nt \mbox{dt}, b_n = \frac{1}{\pi}\int_{-\pi}^\pi f(t) \sin nt \mbox{dt}}$

Beautiful.

Categories: Writing Tags:

## Beautiful Mathematics

While reading an article on the General Unified Theory, I came across a reference to what the author considered beautiful mathematical equations. It got me thinking: what would I consider beautiful math? I must confess right away, that it has been many years since I have done anything remotely advanced in the area of mathematics and not since my master thesis on the mathematical properties of artificial neural networks – drop me a line if you are unable to fall asleep, and I will send you a copy – have I really done any heavy math.

However, the seed was laid in my mind and during my run early this morning I began to consider if I could actually remember any mathematical equations, beautiful or not.

The first one that came to mind was Archimedes’ Recurrence Formula. Being a diver, I have always had a soft spot for old Archi

Let $a_n$ and $b_n$ be the perimeters of the circumscribed and inscribed n-gon and $a_{2n}$ and $b_{2n}$ the perimeters of the circumscribed and inscribed 2n-gon. Then

$\displaystyle{a_{2n} = \frac{2a_nb_n}{a_nb_n}, b_{2n} = \sqrt{a_{2n}b_n}, a_\infty = b_\infty}$

Of course the cool thing is that the successive application gives the Archimedes algorithm, which can be used to provide successive approximations to $\pi$.

The next equation that came to my mind was Eulers Formula or Eulers Identity, which states that

$\displaystyle{e^{ix} = \cos x + i \sin x}$

where $i$ is the imaginary unit. The beautiful equation arises when setting $x = \pi$,

$\displaystyle{e^{i\pi} + 1 = 0}$

The term Mandelbrot set is used to refer both to a general class of fractal sets and to a particular instance of such a set. In general, a Mandelbrot set marks the set of points in the complex plane such that the corresponding Julia set is connected and not computable.

“The” Mandelbrot set is the set obtained from the quadratic recurrence equation

$\displaystyle{z_{n+1} + z_n^2 + C, z_0 = C}$

where points $C$ in the complex plane for which the orbit of $z_n$ does not tend to infinity are in the set.

The image below displays the famous and well known Valley of the Sea Horses.

The next one that came to my mind was the Riemann Hypothesis.

The Riemann hypothesis is a deep mathematical conjecture which states that the non-trivial Riemann zeta function zeros, i.e., the values of $s$ other than $-2, -4, -6, \ldots$ such that $\zeta(s) = 0$ (where $\zeta(s)$ is the Riemann zeta function) all lie on the “critical line” $\sigma = \mathbb R [s] = 1/2$  (where $\mathbb R[s]$ denotes the real part of $s$).

The Riemann zeta-function $\zeta(s)$ is the function of a complex variable $s$ initially defined by the following infinite series:

$\displaystyle{\zeta(s) = \sum_{n=1}^\infty \frac{1}{n^s}}$

The Riemann hypothesis can be stated as:

$\displaystyle{\zeta(\alpha + i\beta) = 0, \beta \not= 0 \Rightarrow \alpha = \frac{1}{2}}$

One could go on and on, but I will finish off with another of my favorites, namely the Gaussian Integral.

The Gaussian integral, also called the probability integral is the integral of the one-dimensional Gaussian function over $(-\infty, \infty)$

$\displaystyle{\int_{-\infty}^\infty e^{-x^2}dx = \sqrt{\pi}}$

Categories: Writing Tags:

## Palindromic numbers

I was reading an article about palindromes the other day, and came across a formel definition of palindromic numbers.

Although palindromic numbers are most often considered in the decimal system, the concept of palindromicity can be applied to the natural numbers in any numeral system.

For the few who does not know it already, here it is – and it gave me an excuse to write a little more $\LaTeX$

Consider a number $n>0$ in base $b\le 2$, where it is written in standard notation with $k+1$ digits $a_i$ as:

$\displaystyle{n = \sum_{i=0}^k a_i b^i}$

with, as usual, $0\le a_i < b$ for all $i$ and $a_k \ne 0$. Then $n$ is palindromic if and only if $a_i = a_{k-i}$ for all $i$. Zero is written $0$ in any base and is also palindromic by definition.

Categories: Writing Tags:

## Scientific writing

I was cleaning out some old CDs the other day, when I happen to stumble over a copy of my master thesis. My thesis was about the mathematical properties of artificial neural networks and I would never have been able to do it without $\LaTeX$. Try to typeset something like

$f_j(x,\theta) = F\displaystyle{\left(\sum_{h=0}^lG(\bar x'\gamma_j)\beta_{jh}\right)},\ h=1,\ldots,l.$

Definition 2.2
For any (Borel) measurable function $G(\cdot)$ mapping $R$ to $R$ and $n\in N$ let $\sum^n(G)$ be the class of functions

$\displaystyle{\left\{f:\mathbb R^n\rightarrow \mathbb R | f(x)=\sum_{j=1}^l\beta_j G(A_j(x)),\ x\in\mathbb R^n,\ \beta_j\in\mathbb R, A_j\in\mathbf A ^n,\ l\in\mathbb N\right\}}$

The WordPress plugin I have found for typesetting $\LaTeX$ does not do a very good job, so please bear with the above.

I have recently installed MacTeX on my iMac. I have no idea of what I should use if for right now, but it feels good and maybe I should try to finish some of the stuff I’m writing on and try to get it published, even though it will be hard not being in the university community any more.

Let’s just take another few equations for the fun of it

$\displaystyle{\int_{\mathbb R^n}\int_{\mathbb R} a^\alpha D^{|\alpha} G(a'x - \theta)\frac{|b|^n \hat f(ba)e^{2\pi ib\theta}}{\hat G(b)}\mbox{d}a\ \mbox{d}\theta}$
Categories: Writing Tags: