[texhax] Translating into math-like symbols

WILLIAM D MARKEL markel33 at verizon.net
Mon Apr 24 00:03:33 CEST 2006

OK, I joined TUG and got the disks.  Everything is installed.  What I want to be able to do is translate stuff like what follows into something resembling math.  So far, I haven't a clue about how to do this.

% This file was created by EXP Version 5.1.













\ Averages \ and Variability


W. D. Markel, 1995



Theoretical Averages





\LTab{If you rolled a single die a large number of times and took the average

of the numbers that came up, what would you expect this average to be? \ It

would appear to be reasonable, since there is no basis for believing that any

number is any more likely to come up than any other number, that this average

should be in the vicinity of $\frac{1+2+3+4+5+6}{6}=3.5$.}






\LTab{Of course, if you actually rolled the die, say 50 times, and averaged

the numbers that turned up, you would probably not get exactly 3.5, although

you would probably get something close to it. \ As a matter of fact, if you

were to roll the die 50 more times, you would probably get a different

average than you did the first time.}






\LTab{The number 3.5 is called the expected value or theoretical average of

the variable which we might designate ``the spot showing on the die'', and is

denoted by the symbol $\mu$ or $E(X)$ where $X$ is the variable in question.

\ In general, if we let $X$ represent the name of a variable,

$x_1,x_2,x_3,...,x_N$ be the specific values that the variable may assume,

and $p_i$ be the probability associated with each $x_i$, then we define







In the example that we started with, $x_1=1,x_2=2,x_3=3,x_4=4,x_5=5,x_6=6,$

and each $p_i=\frac{1}{6}.\,\,$So the 3.5 represents a kind of average; \ not

what you would necessarily get if you actually rolled the die, but what you

would expect to average if you rolled the die a large number of times. \ \

(It's pretty boring to roll the die, say, 10000 times, but, if you did, you

would get an average pretty close to 3.5. \ Fortunately, we can simulate this

on a computer pretty easily and \ possibly convince you, if you need

convincing, that this is the case.)





\LTab{Let's look at another example. \ Suppose that I flip a coin three times

and let my variable, $X$, represent the number of heads that I obtain. \

Notice that $X$ may assume the values 0,1,2, or 3. \ Furthermore, by looking

at all the ways the coins can fall $(HHH,HHT,...)$ it is not hard to see that

the number of heads occurs with the following probabilities.}\\











Does this mean that you are ever going to get 1$\frac{1}{2}$ heads when you

perform this experiment? \ Of course not! \ What it does mean, however, is

that if you repeated the experiment a large number of times (that is,

flipping a coin three times and noting the number of heads) and averaged the

results, this average should be in the neighborhood of 1$\frac{1}{2}$.





\LTab{The theoretical mean, or expected value, of a variable is used in a

wide variety of applications, including playing games of chance, the stock

market, and buying insurance. \ As a very simple example, suppose that a

basketball team makes 40\% of its three-point shots and 50\% of its two-point

shots. \ From strictly an expectation perspective, the expected value of the

three-point shot is \ (.4)(3)=1.2 and of the two-point shot is (.5)(2)=1, so

the team would be better off taking three pointers. \ (I am sure that you can

see that, in a practical sense, there are other things to consider, but let's

skip this.)}






\LTab{The $E(X)$ notation is handy because it is general. \ That is, it is

just as easy to associate meaning with, say, $E(2X+1)\,$or $E(X^2)$ as it is

with $E(X)$. \ In the three flips of the coin example, we have $X\,=0,1,2,3$,

hence, $2X+1=1,3,5,7$ and $X^2=0,1,4,9$. \ Then,








(Note that 4=2(1.5)+1, 1.5 being the expected value of just plain $X$. \

Hmmm. \ I leave it to the reader to convince himself/herself that

$E(X^2)=3.\,\,$Now try these problems.



Problem set 1





\LTab{1. \ Show that the probabilities in the ``three flips of a coin''

problem are correct. \ Also, show that $E(X^2)\,$is really equal to 3.}\\

\LTab{2. \ If a lottery ticket cost \$1 and there are three prizes, worth,

respectively, \$10, \$50, and \$100, and the probabilities of winning each

are, respectively, 5\%, 1\%, and .1\%, what is the expected value of the

lottery? \ ans: \$.10}\\

\LTab{3. \ Sometimes the theoretical mean may be obtained by means of a

shortcut. \ One of the more obvious cases involves a binomial variable. \ A

binomial experiment consists of any situation where each ``trial'' can have

exactly \ two outcomes. \ Examples are flipping a coin, the results of a

two-way election, or guessing the right answer on a multiple choice test. \

The variable, $X$, represents the number of times we get the desired result

(success) out of $n$ trials. \ If the probability of success on any of these

trials is $p$ then $E(X)=np$.}\\

\LTab{a) \ If you were guessing at answers on a 20 question multiple choice

test, in which there were 5 choices per question, about how many questions

should you get correct? ans: 4}\\

\LTab{b) \ In the example involving the three flips of a coin, note that

$n=3$ and $p=\frac{1}{2}$. \ Does the short-cut give the same answer as the

longer method which we used?}\\

\LTab{4. \ Some other theoretical means may be deduced by common sense. \ For

example, how many times, on the average, would you expect to roll a die until

you got a 6? \ How many times would you expect to flip a coin until you got a

head? \ (If not convinced, try doing these things a few times!) \ Now

generalize. \ If $\,p$ represents the probability of success on a single

trial and $X$ represents the number of trials until a success is obtained,

what is $E(X)$?}\\

\LTab{$\bigstar 5$. \ Show that the following properties are true for

expected values.}\\

\LTab{a) \ $E(c)=c,\,$where c is any constant}\\

\LTab{b) \ $E(cX)=cE(X)$}\\

\LTab{c) \ $E(X+Y)=E(X)+E(Y)$}




Sample Averages





\LTab{A very fundamental idea in statistics concerns whether a set of numbers

represents a population or a sample. \ A population consists of all the items

under consideration (and is kind of like a universal set) while a population

consists of just part of the items (like a subset). \ A population, in fact,

can consist of all of the possible outcomes of rolling a single die. \ In

this instance, a sample would consist of the actual outcomes when you rolled

the die a certain number of times. \ Of course, we can compute averages of

samples, just like averages are always computed. \ The thing to remember is

that these sample averages are variable while the population average, $\mu$

or $E(X)$ is considered constant. \ We call the sample average $\overline{x}$

and it is defined by the familiar formula,







It is helpful to provide a little more general formula, in fact, which allows

for each $x_i\,$to occur more than once. \ Thus, if $x_i\,$occurs $f_i$






where $m=f_1+f_2+\cdots+f_n$.





\LTab{For example, if I average my class grades in which there are 6 A's (4

points), 8 B's (3 points), 10 C's (2 points), 2 D's (1 point), and 1 F (0

points), my average is


\overline{x}=\frac{4\cdot 6+3\cdot 8+2\cdot 10+1\cdot 2+0\cdot 1}{27}=2.59





You may observe the similarity between (1), the theoretical mean, and (5) the

sample mean if \ we write 5 as






and think of the $\frac{f_i}{m}\,$terms as ``probabilities.''





\LTab{The point is, both kinds of averages--population and sample--represent,

essentially, the same concept. \ In fact, sometimes it is not even important

whether the data represent a population or a sample, which is why the

notations $\mu$ and $\overline{x}$ are often used interchangibly.}




Variance and Standard Deviation





\LTab{There are several ways to measure the ``spread'' or the variability of

data, the most common of which are the variance$\,$and the standard

deviation. \ (Actually, the standard deviation is no big deal, since it is

just the square root of the variance.) \ The theoretical variance, denoted by

the symbol $\sigma^2$is defined symbolically as







Remembering that 


E(Anything)=Anything_1\cdot p_1+\cdots+Anything_n\cdot p_{n\text{,}}



this notation means that 





In terms of our example with the three coins, 







As stated previously, the standard deviation, denoted by $\sigma$ (without

the square) is simply the square root of the variance. \ That is, in this case





The standard deviation is the measure most often referred to, because it is

in the same units as the original data. \ (For example, if the data were in

feet, the variance would be in square feet and the standard deviation in






\LTab{You might well ask ``.866 what?'' \ What is a standard deviation,

anyway? \ Roughly it measures the average amount of deviation from the mean.

\ That is, I could make the semi-accurate statement that, as I repeat the

coin flipping experiment, I could expect the number of heads to deviate from

1.5 by about .866. \ Again, this is only approximately true, and sometimes

it's not very true at all! \ About all that can really be said is that the

bigger the standard deviation the more spread there is.}


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://tug.org/pipermail/texhax/attachments/20060423/b5dd2a54/attachment-0001.htm 

More information about the texhax mailing list