<?xml version="1.0" encoding="utf-8" standalone="no"?>
<!DOCTYPE document PUBLIC "-//CNX//DTD CNXML 0.5 plus MathML//EN" "http://cnx.rice.edu/cnxml/0.5/DTD/cnxml_mathml.dtd">
<document xmlns="http://cnx.rice.edu/cnxml" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="m10244">

  <name>Probability Equations</name>

  <metadata>
  <md:version>2.1</md:version>
  <md:created>2001/08/07</md:created>
  <md:revised>2001/08/07 00:00:00.001 GMT-5</md:revised>
  <md:authorlist>
      <md:author id="jago">
      <md:firstname>Adan</md:firstname>
      
      <md:surname>Galvan</md:surname>
      <md:email>jago@rice.edu</md:email>
    </md:author>
  </md:authorlist>

  <md:maintainerlist>
    <md:maintainer id="jago">
      <md:firstname>Adan</md:firstname>
      
      <md:surname>Galvan</md:surname>
      <md:email>jago@rice.edu</md:email>
    </md:maintainer>
  </md:maintainerlist>
  
  <md:keywordlist>
    <md:keyword>probability</md:keyword>
    <md:keyword>statistics</md:keyword>
  </md:keywordlist>

  <md:abstract>A collection of probability equations.</md:abstract>
</metadata>

  <content>
    <section id="main">
      <name>Probability equations</name>

      <section id="section1">
	<name>Simple Probability</name>

	<equation id="simple">
	  <m:math>
	    <m:apply>
	      <m:eq/>
	      <m:apply>
		<m:csymbol definitionURL="http://cnx.rice.edu/cd/cnxmath.ocd#probability"/>
		<m:ci>x</m:ci>
	      </m:apply>
	      <m:apply>
		<m:divide/>
		<m:ci>Favorable Outcomes</m:ci>
		<m:ci>Possible Outcomes</m:ci>
	      </m:apply>
	    </m:apply>
	  </m:math>
	</equation>

	<exercise id="card">
	  <problem>
	    <para id="card1">
	      What is the probability that a card drawn at random from
	      a deck of cards will be an ace?
	    </para>
	  </problem>
	  <solution>
	    <para id="cardsol">
	      Since of the 52 cards in the deck, 4 are aces, the
	      probability is 4/52.
	    </para>
	  </solution>
	</exercise>

      </section>

      <section id="conditional">
	<name>Conditional Probability</name>

	<para id="cond1">
	  A conditional probability is the probability of an event
	  given that another event has occurred. For example, what is
	  the probability that the total of two dice will be greater
	  than 8 given that the first die is a 6? This can be computed
	  by considering only outcomes for which the first die is a
	  6. Then, determine the proportion of these outcomes that
	  total more than 8. All the possible outcomes for two dice
	  are shown in the section on simple probability. There are 6
	  outcomes for which the first die is a 6, and of these, there
	  are four that total more than 8 (6,3; 6,4; 6,5; 6,6). The
	  probability of a total greater than 8 given that the first
	  die is 6 is therefore 4/6 = 2/3.  More formally, this
	  probability can be written as: 
	  <m:math>
	    <m:apply>
	      <m:eq/>
	      <m:apply>
		<m:csymbol definitionURL="http://cnx.rice.edu/cd/cnxmath.ocd#probability"/>
		<m:condition>
		<m:apply>
		  <m:eq/>
		  <m:ci>Die 1</m:ci>
		  <m:cn>6</m:cn>
		</m:apply>
		</m:condition>
		<m:apply>
		  <m:gt/>
		  <m:ci>total</m:ci>
		  <m:cn>8</m:cn>
		</m:apply>
	      </m:apply>
	      <m:cn type="rational">2<m:sep/>3</m:cn>
	    </m:apply>
	  </m:math>.  In this equation, the expression to the left of
	  the vertical bar represents the event and the expression to
	  the right of the vertical bar represents the condition. Thus
	  it would be read as "The probability that the total is
	  greater than 8 given that Die 1 is 6 is 2/3." In more
	  abstract form,
	  <m:math>
	    <m:apply>
	      <m:csymbol definitionURL="http://cnx.rice.edu/cd/cnxmath.ocd#probability"/>
	      <m:condition>
		<m:ci>B</m:ci>
	      </m:condition>
	      <m:ci>A</m:ci>
	    </m:apply>
	  </m:math> is the probability of event A given that event B
	  occurred.
	</para>
      </section>

      <section id="aandb">
	<name>Probability of A and B</name>

	<equation id="probiv">
	  <name>Probability of A and B: Independent Variables</name>

	  <m:math>
	    <m:apply>
	      <m:eq/>
	      <m:apply>
		<m:csymbol definitionURL="http://cnx.rice.edu/cd/cnxmath.ocd#probability"/>
		<m:apply>
		  <m:and/>
		  <m:ci>A</m:ci>
		  <m:ci>B</m:ci>
		</m:apply>
	      </m:apply>
	      <m:apply>
		<m:times/>
		<m:apply>
		  <m:csymbol definitionURL="http://cnx.rice.edu/cd/cnxmath.ocd#probability"/>
		  <m:ci>A</m:ci>
		</m:apply>
		<m:apply>
		  <m:csymbol definitionURL="http://cnx.rice.edu/cd/cnxmath.ocd#probability"/>
		  <m:ci>B</m:ci>
		</m:apply>
	      </m:apply>
	    </m:apply>
	  </m:math>
	</equation>

	<exercise id="coins">

	  <problem>
	    <para id="coin1">
	      What is the probability that a fair coin will come up with
	      heads twice in a row?
	    </para>
	  </problem>

	  <solution>
	    <para id="coinsol">
	      Two events must occur: a head on the first toss and a
	      head on the second toss. Since the probability of each
	      event is 1/2, the probability of both events is: 
	  <m:math>
	    <m:apply>
	      <m:eq/>
	      <m:apply>
		<m:times/>
		    <m:cn type="rational">1<m:sep/>2</m:cn>
		    <m:cn type="rational">1<m:sep/>2</m:cn>
		  </m:apply>
		  <m:cn type="rational">1<m:sep/>4</m:cn>
		</m:apply>
	      </m:math>.
	    </para>
	  </solution>
	</exercise>

	<equation id="cond2">
	  <name>Probability of A and B: Dependent Variables</name>

	  <m:math>
	    <m:apply>
	      <m:eq/>
	      <m:apply>
		<m:csymbol definitionURL="http://cnx.rice.edu/cd/cnxmath.ocd#probability"/>
		<m:apply>
		  <m:and/>
		  <m:ci>A</m:ci>
		  <m:ci>B</m:ci>
		</m:apply>
	      </m:apply>
	      <m:apply>
		<m:times/>
		<m:apply>
		  <m:csymbol definitionURL="http://cnx.rice.edu/cd/cnxmath.ocd#probability"/>
		  <m:ci>A</m:ci>
		</m:apply>
		<m:apply>
		  <m:csymbol definitionURL="http://cnx.rice.edu/cd/cnxmath.ocd#probability"/>
		  <m:condition>
		    <m:ci>A</m:ci>
		  </m:condition>
		  <m:ci>B</m:ci>
		</m:apply>
	      </m:apply>
	    </m:apply>
	  </m:math>
	</equation>


	<exercise id="aces">
	  <problem>
	    <para id="cards2">
	      If someone draws a card at random from a deck and then,
	      without replacing the first card, draws a second card,
	      what is the probability that both cards will be aces?
	    </para>
	  </problem>

	  <solution>
	    <para id="acessol">
	      Event A is that the first card is an ace. Since 4 of the
	      52 cards are aces, 
	      <m:math>
		<m:apply>
		  <m:eq/>
		  <m:apply>
		    <m:csymbol definitionURL="http://cnx.rice.edu/cd/cnxmath.ocd#probability"/>
		    <m:ci>A</m:ci>
		  </m:apply>
		  <m:cn type="rational">4<m:sep/>52</m:cn>
		  <m:cn type="rational">1<m:sep/>13</m:cn>
		</m:apply>
	      </m:math>.  Given that the first card is an ace, what is
	      the probability that the second card will be an ace as
	      well?  Of the 51 remaining cards, 3 are aces. Therefore,
	      <m:math>
		<m:apply>
		  <m:eq/>
		  <m:apply>
		    <m:csymbol definitionURL="http://cnx.rice.edu/cd/cnxmath.ocd#probability"/>
		    <m:condition>
		      <m:ci>A</m:ci>
		    </m:condition>
		    <m:ci>B</m:ci>
		  </m:apply>
		  <m:cn type="rational">3<m:sep/>51</m:cn>
		  <m:cn type="rational">1<m:sep/>17</m:cn>
		</m:apply>
	      </m:math> and the probability of A and B is:
	      <m:math>
		<m:apply>
		  <m:eq/>
		  <m:apply>
		    <m:times/>
		    <m:cn type="rational">1<m:sep/>13</m:cn>
		    <m:cn type="rational">1<m:sep/>17</m:cn>
		  </m:apply>
		  <m:cn type="rational">1<m:sep/>221</m:cn>
		</m:apply>
	      </m:math>. 
	    </para>
	  </solution>
	</exercise>

      </section>

      <section id="aorb">
	<name>Probability of A or B</name>

	<equation id="aorb1">
	  <name>Probability of A or B: Mutually Exclusive Variables</name>

	  <m:math>
	    <m:apply>
	      <m:eq/>
	      <m:apply>
		<m:csymbol definitionURL="http://cnx.rice.edu/cd/cnxmath.ocd#probability"/>
		<m:apply>
		  <m:or/>
		  <m:ci>A</m:ci>
		  <m:ci>B</m:ci>
		</m:apply>
	      </m:apply>
	      <m:apply>
		<m:plus/>
		<m:apply>
		  <m:csymbol definitionURL="http://cnx.rice.edu/cd/cnxmath.ocd#probability"/>
		  <m:ci>A</m:ci>
		</m:apply>
		<m:apply>
		  <m:csymbol definitionURL="http://cnx.rice.edu/cd/cnxmath.ocd#probability"/>
		  <m:ci>B</m:ci>
		</m:apply>
	      </m:apply>
	    </m:apply>
	  </m:math>
	</equation>

	<equation id="aorb2">
	  <name>Probability of A or B:Not Mutually Exclusive Variables</name>
 <m:math>
	    <m:apply>
	      <m:eq/>
	      <m:apply>
		<m:csymbol definitionURL="http://cnx.rice.edu/cd/cnxmath.ocd#probability"/>
		<m:apply>
		  <m:or/>
		  <m:ci>A</m:ci>
		  <m:ci>B</m:ci>
		</m:apply>
	      </m:apply>
	      <m:apply>
		<m:minus/>
		<m:apply>
		  <m:plus/>
		  <m:apply>
		    <m:csymbol definitionURL="http://cnx.rice.edu/cd/cnxmath.ocd#probability"/>
		    <m:ci>A</m:ci>
		  </m:apply>
		  <m:apply>
		    <m:csymbol definitionURL="http://cnx.rice.edu/cd/cnxmath.ocd#probability"/>
		    <m:ci>B</m:ci>
		  </m:apply>
		</m:apply>
		<m:apply>
		  <m:csymbol definitionURL="http://cnx.rice.edu/cd/cnxmath.ocd#probability"/>
		  <m:apply>
		    <m:and/>
		    <m:ci>A</m:ci>
		    <m:ci>B</m:ci>
		  </m:apply>
		</m:apply>
	      </m:apply>
	    </m:apply>
	  </m:math>
	</equation>
      </section>


      <section id="binomial">
	<name>Binomial Distribution</name>

	<para id="binomiala">
	  The binomial probability for obtaining
	  <m:math><m:ci>r</m:ci></m:math> successes in
	  <m:math><m:ci>N</m:ci></m:math> trials is:

	  <equation id="binomial1">
	    <m:math>
	      <m:apply>
		<m:eq/>
		<m:apply>
		  <m:csymbol definitionURL="http://cnx.rice.edu/cd/cnxmath.ocd#probability"/>
		  <m:ci>r</m:ci>
		</m:apply>
		<m:apply>
		  <m:times/>
		  <m:apply>
		    <m:divide/>
		    <m:apply>
		      <m:factorial/>
		      <m:ci>N</m:ci>
		    </m:apply>
		    <m:apply>
		      <m:times/>
		      <m:apply>
			<m:factorial/>
			<m:ci>r</m:ci>
		      </m:apply>
		      <m:apply>
			<m:factorial/>
			<m:apply>
			  <m:minus/>
			  <m:ci>N</m:ci>
			  <m:ci>r</m:ci>
			</m:apply>
		      </m:apply>
		    </m:apply>
		  </m:apply>
		  <m:apply>
		    <m:power/>
		    <m:ci>π</m:ci>
		    <m:ci>r</m:ci>
		  </m:apply>
		  <m:apply>
		    <m:power/>
		    <m:apply>
		      <m:minus/>
		      <m:cn>1</m:cn>
		      <m:ci>π</m:ci>
		    </m:apply>
		    <m:apply>
		      <m:minus/>
		      <m:ci>N</m:ci>
		      <m:ci>r</m:ci>
		    </m:apply>
		  </m:apply>
		</m:apply>
	      </m:apply>
	    </m:math>
	  </equation>

	  where 
	  <m:math>
	    <m:apply>
	      <m:csymbol definitionURL="http://cnx.rice.edu/cd/cnxmath.ocd#probability"/>
	      <m:ci>r</m:ci>
	    </m:apply>
	  </m:math> is the probability of exactly
	  <m:math><m:ci>r</m:ci></m:math> successes,
	  <m:math><m:ci>N</m:ci></m:math> is the number of events, and
	  <m:math><m:ci>p</m:ci></m:math> is the probability of
	  success on any one trial. This formula assumes that the
	  events:
	  <list id="binomiallist1" type="enumerated">
	    <item>are dichotomous (fall into only two
	      categories)</item>
            <item>are mutually exclusive</item>
            <item>are independent and</item>
            <item>are randomly selected</item>
	  </list>
	</para>

	<exercise id="binomialex">
	  <problem>
	    <para id="binomprob">
	      Consider this simple application of the binomial
	      distribution: What is the probability of obtaining
	      exactly 3 heads if a fair coin is flipped 6 times?
	    </para>
	  </problem>
	  <solution>
	    <para id="binomsol">
	      For this problem,
	      <m:math>
		<m:apply>
		  <m:eq/>
		  <m:ci>N</m:ci>
		  <m:cn>6</m:cn>
		</m:apply>
	      </m:math>, 
	      <m:math>
		<m:apply>
		  <m:eq/>
		  <m:ci>r</m:ci>
		  <m:cn>3</m:cn>
		</m:apply>
	      </m:math>, and 
	      <m:math>
		<m:apply>
		  <m:eq/>
		  <m:ci>π</m:ci>
		  <m:cn>0.5</m:cn>
		</m:apply>
	      </m:math>.  Therefore,
	      <m:math display="block">
		<m:apply>
		  <m:eq/>
		  <m:apply>
		    <m:csymbol definitionURL="http://cnx.rice.edu/cd/cnxmath.ocd#probability"/>
		    <m:cn>3</m:cn>
		  </m:apply>
		  <m:apply>
		    <m:times/>
		    <m:apply>
		      <m:divide/>
		      <m:apply>
			<m:factorial/>
			<m:cn>6</m:cn>
		      </m:apply>
		      <m:apply>
			<m:times/>
			<m:apply>
			  <m:factorial/>
			  <m:cn>3</m:cn>
			</m:apply>
			<m:apply>
			  <m:factorial/>
			  <m:apply>
			    <m:minus/>
			    <m:cn>6</m:cn>
			    <m:cn>3</m:cn>
			  </m:apply>
			</m:apply>
		      </m:apply>
		    </m:apply>
		    <m:apply>
		      <m:power/>
		      <m:cn>0.5</m:cn>
		      <m:cn>3</m:cn>
		    </m:apply>
		    <m:apply>
		      <m:power/>
		      <m:apply>
			<m:minus/>
			<m:cn>1</m:cn>
			<m:cn>0.5</m:cn>
		      </m:apply>
		      <m:apply>
			<m:minus/>
			<m:cn>6</m:cn>
			<m:cn>3</m:cn>
		      </m:apply>
		    </m:apply>
		  </m:apply>
		  <m:apply>
		    <m:times/>
		    <m:apply>
		      <m:divide/>
		      <m:apply>
			<m:times/>
			<m:cn>6</m:cn>
			<m:cn>5</m:cn>
			<m:cn>4</m:cn>
			<m:cn>3</m:cn>
			<m:cn>2</m:cn>
		      </m:apply>
		      <m:apply>
			<m:times/>
			<m:apply>
			  <m:times/>
			  <m:cn>3</m:cn>
			  <m:cn>2</m:cn>
			</m:apply>
			<m:apply>
			  <m:times/>
			  <m:cn>3</m:cn>
			  <m:cn>2</m:cn>
			</m:apply>
		      </m:apply>
		    </m:apply>           
		    <m:apply>
		      <m:times/>
		      <m:cn>0.125</m:cn>
		      <m:cn>0.125</m:cn>
		    </m:apply>
		  </m:apply>
		  <m:cn>0.3125</m:cn>
		</m:apply>
	      </m:math>

	    </para>
	  </solution>
	</exercise>
      </section>

    </section>

  </content>
</document>
