<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://ideawaza.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=69.118.0.0%2F16</id>
	<title>IdeaWazaWiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://ideawaza.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=69.118.0.0%2F16"/>
	<link rel="alternate" type="text/html" href="https://ideawaza.com/wiki/Special:Contributions/69.118.0.0/16"/>
	<updated>2026-09-30T22:29:56Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.46.0</generator>
	<entry>
		<id>https://ideawaza.com/index.php?title=Archive:Micah_Moore&amp;diff=62767</id>
		<title>Archive:Micah Moore</title>
		<link rel="alternate" type="text/html" href="https://ideawaza.com/index.php?title=Archive:Micah_Moore&amp;diff=62767"/>
		<updated>2008-06-27T02:32:25Z</updated>

		<summary type="html">&lt;p&gt;69.118.121.76: her website is still active and continually updated, so she hasn&amp;#039;t completely retired from the industry&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Female adult bio|&lt;br /&gt;
name=      Micah Moore|&lt;br /&gt;
photo= [[Image:MicahMooreHeadShot.jpg|200px]] |&lt;br /&gt;
birth=     {{birth date and age|1987|10|05}}|&lt;br /&gt;
death=     |&lt;br /&gt;
location=    [[Oregon]], [[United States|U.S.]]|&lt;br /&gt;
measurements=  34a-24-34|&lt;br /&gt;
height=     {{height|ft=5|in=8}}|&lt;br /&gt;
weight=     {{convert|110|lb|kg|abbr=on|lk=on}}|&lt;br /&gt;
eye color=   Brown|&lt;br /&gt;
hair color=   Brown|&lt;br /&gt;
natural bust=  yes|&lt;br /&gt;
ethnicity=   [[German American]], [[Native Americans in the United States|Native American]] |&lt;br /&gt;
alias=     Mika, Micha, Mica Moore| &lt;br /&gt;
homepage=  http://www.ClubMicah.com/  |&lt;br /&gt;
iafd=      MicahMoore|&lt;br /&gt;
imdb=      2398911|&lt;br /&gt;
afdb=      43304|&lt;br /&gt;
afdb name=   Micah Moore|&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Micah Moore&#039;&#039;&#039; (born on [[October 5]] [[1987]] in [[Oregon]]) was an [[United States|American]] [[pornographic actor|pornographic actress]].&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
Moore has been in the adult film industry since 2006 when she was 18. Her first movie was Teen Dreams #13. Her name is spelled Micah Moore, but she has been credited on websites as Mika, Micha, and Micha More.&lt;br /&gt;
&lt;br /&gt;
== Porn and acting career ==&lt;br /&gt;
&lt;br /&gt;
During her senior year in high school Micah began working in a popular coffee shop where she met future porn star [[Mckenzee Miles]], who was another hopeful adult actress. The two girls moved in together and began stripping at a local strip club in [[Beaverton, Oregon]]. &amp;quot;...we started stripping at a club. We didn&#039;t take it very seriously. We were doing the robot on stage and shit like that. It didn&#039;t go over very well.&amp;quot;&amp;lt;ref name=PVN&amp;gt;{{cite web|url=http://www.pornvalleynews.com/home/archives/2006/12/micah_moore_int.html|title= Micah Moore Interview|month=December|year=2006|publisher=PornValleyNews|accessdate=2007-09-20}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the spring of 2006, Micah and Mckenzee shot their first porn videos in [[Ft. Lauderdale, Florida]]. After filming finished, Micah flew home to finish high school.&lt;br /&gt;
&lt;br /&gt;
In summer 2006, Moore and Miles left Portland and moved to the [[San Fernando Valley]] in southern [[California]]. Once there, Micah successfully began working with a number of legitimate movie companies and starred in over 39 adult DVDs and videos, quickly making a name for herself in the porn industry with titles such as Wasted Youth 2, Muff Bumpers, Fresh Newcummers, and Ass Fixation 2.&amp;lt;ref&amp;gt;{{cite web|url=http://www.imdb.com/name/nm2398911/|title= Micah Moore IMDB Page|accessdate=2007-09-20}}&amp;lt;/ref&amp;gt; She worked solidly for over a year.&lt;br /&gt;
&lt;br /&gt;
Micah has done solo, girl/girl, and boy/girl, but has not done any anal work yet. When asked when or if she would do anal, Moore replied that she was waiting until she had her own site so that she could capitalize off of the demand. She attended the [[AVN Adult Entertainment Expo]] in 2007 and was met by many adoring fans.&amp;lt;ref&amp;gt;{{cite web|url=http://youtube.com/watch?v=dxGVBCGhrxE|title= Micah Moore attends AEE 2007|accessdate=2007-09-20}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
In 2007, Micah announced that she would no longer shoot boy/girl scenes and would only engage in girl/girl or solo work.&amp;lt;ref name=AINews2007&amp;gt;[http://ainews.com/Archives/Story12184.phtml &amp;quot;Micah Moore Goes Like Totally Vegan&amp;quot;],  [[July 31]], [[2007]], Bad Ass Models Company Press Release, Adult Industry News. Retrieved [[2007-12-13]].&amp;lt;/ref&amp;gt; She left the porn industry in shortly after the [[AVN Awards]] in [[Las Vegas, Nevada]], and moved back to [[Oregon]] to start her undergraduate work.&amp;lt;ref name=PVN2007&amp;gt;[http://www.pornvalleynews.com/home/archives/2007/07/micah_moore_say_1.html &amp;quot;Micah Moore Says Goodbye to Porn&amp;quot;], Porn Valley News, [[July 16]], [[2007]]. Retrieved [[2007-12-13]].&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Micah is currently working on her solo and girl/girl site, ClubMicah.com which is the only project Micah Moore is still actively involved with in the porn industry.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
{{reflist}}&lt;br /&gt;
&lt;br /&gt;
==External links==&lt;br /&gt;
{{Commonscat|Micah_Moore}}&lt;br /&gt;
*[http://www.ClubMicah.com Micah Moore Official Web Site].&lt;br /&gt;
*[http://joy-scape.com/ann/10532/Interview+with+Micah+Moore.html Interview] at Adult Industry Press&lt;br /&gt;
*[http://blog.adultdvdtalk.com/2007/01/micah_moore_portland_babes_do.html &amp;quot;MICAH MOORE: Portland Babes Do It Better&amp;quot;], Drew Black, [[January 30]], [[2007]], audio interview at Adult DVD Talk.&lt;br /&gt;
*[http://youtube.com/watch?v=dxGVBCGhrxE Micah Moore attends AEE 2007 on Youtube].&lt;br /&gt;
* [http://www.rogreviews.com/interviews/micah_moore_07.asp &amp;quot;Micah Moore Interview 2007&amp;quot;], by Roger T. Pipe.&lt;br /&gt;
&lt;br /&gt;
{{DEFAULTSORT:Moore, Micah}}&lt;br /&gt;
[[Category:1987 births]]&lt;br /&gt;
[[Category:Living people]]&lt;br /&gt;
[[Category:American female adult models]]&lt;br /&gt;
[[Category:American porn stars]]&lt;br /&gt;
[[Category:Female porn stars]]&lt;br /&gt;
&lt;br /&gt;
[[fa:دوان (ستاره پورنو)]]&lt;br /&gt;
[[it:Micah Moore]]&lt;/div&gt;</summary>
		<author><name>69.118.121.76</name></author>
	</entry>
	<entry>
		<id>https://ideawaza.com/index.php?title=Archive:Aquamarine&amp;diff=25958</id>
		<title>Archive:Aquamarine</title>
		<link rel="alternate" type="text/html" href="https://ideawaza.com/index.php?title=Archive:Aquamarine&amp;diff=25958"/>
		<updated>2006-04-04T21:29:12Z</updated>

		<summary type="html">&lt;p&gt;69.118.241.162: /* Culture and historical/mythical usage */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{otheruses1|the mineral}}&lt;br /&gt;
&lt;br /&gt;
[[Image:Aquamarin cut.jpg|Aquamarine|thumb|250px]]&lt;br /&gt;
&#039;&#039;&#039;Aquamarine&#039;&#039;&#039; (Lat. &#039;&#039;aqua marina&#039;&#039;, &amp;quot;water of the sea&amp;quot;) is a [[gemstone]]-quality transparent variety of [[beryl]], having a delicate blue or blue-green color, suggestive of the tint of sea-water. It&#039;s closely related to the gem [[emerald]].&lt;br /&gt;
&lt;br /&gt;
It occurs at most localities which yield ordinary beryl, some of the finest coming from [[Russia]]. The gem-gravels of [[Sri Lanka]] contain aquamarine. Clear yellow beryl, such as occurs in [[Brazil]], is sometimes called aquamarine chrysolite. When [[corundum]] presents the bluish tint of typical aquamarine, it is often termed Oriental aquamarine. &lt;br /&gt;
&lt;br /&gt;
In the [[United States]], aquamarines can be found at the summit of [[Mount Antero|Mt. Antero]] in the [[Sawatch Range]] in central [[Colorado]]. In [[Brazil]], there are mines in the states of [[Minas Gerais]], [[Espírito Santo]] and [[Bahia]].&lt;br /&gt;
&lt;br /&gt;
The biggest aquamarine ever mined was found at the city of Marambaia, Minas Gerais. It weighed over 110 kg, and its dimensions were 48.5 cm long and 42 cm in diameter.&lt;br /&gt;
&lt;br /&gt;
==Culture and historical/mythical usage==&lt;br /&gt;
Aquamarine is the [[birthstone]] associated with [[March]]. It is also the gemstone for the 19th Anniversary. Belief that when immersed, it has magical healing qualities.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[List of minerals]]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
* {{1911}}&lt;br /&gt;
* Diamond Bug. [http://diamondbug.blogspot.com/2006/03/flawless-aquamarine-march-birthstone.html &amp;quot;Flawless Aquamarine: March Birthstone&amp;quot;]. Retrieved March 16, 2006.&lt;br /&gt;
&lt;br /&gt;
[[Category:Silicate minerals]]&lt;br /&gt;
[[Category:Gemstones]]&lt;br /&gt;
&lt;br /&gt;
[[bg:Аквамарин]]&lt;br /&gt;
[[da:Akvamarin]]&lt;br /&gt;
[[de:Aquamarin]]&lt;br /&gt;
[[et:Akvamariin]]&lt;br /&gt;
[[fr:Aigue-marine]]&lt;br /&gt;
[[lt:Akvamarinas]]&lt;br /&gt;
[[nl:Aquamarijn]]&lt;br /&gt;
[[ja:アクアマリン]]&lt;br /&gt;
[[no:Akvamarin]]&lt;br /&gt;
[[pl:Akwamaryn]]&lt;br /&gt;
[[pt:Água-marinha]]&lt;br /&gt;
[[ru:Аквамарин]]&lt;br /&gt;
[[sl:Akvamarin (kamen)]]&lt;br /&gt;
[[vi:Berin]]&lt;br /&gt;
[[tr:Akuamarin]]&lt;br /&gt;
[[uk:Аквамарин]]&lt;/div&gt;</summary>
		<author><name>69.118.241.162</name></author>
	</entry>
	<entry>
		<id>https://ideawaza.com/index.php?title=Archive:Aquamarine&amp;diff=25957</id>
		<title>Archive:Aquamarine</title>
		<link rel="alternate" type="text/html" href="https://ideawaza.com/index.php?title=Archive:Aquamarine&amp;diff=25957"/>
		<updated>2006-04-04T21:28:34Z</updated>

		<summary type="html">&lt;p&gt;69.118.241.162: /* Culture and historical/mythical usage */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{otheruses1|the mineral}}&lt;br /&gt;
&lt;br /&gt;
[[Image:Aquamarin cut.jpg|Aquamarine|thumb|250px]]&lt;br /&gt;
&#039;&#039;&#039;Aquamarine&#039;&#039;&#039; (Lat. &#039;&#039;aqua marina&#039;&#039;, &amp;quot;water of the sea&amp;quot;) is a [[gemstone]]-quality transparent variety of [[beryl]], having a delicate blue or blue-green color, suggestive of the tint of sea-water. It&#039;s closely related to the gem [[emerald]].&lt;br /&gt;
&lt;br /&gt;
It occurs at most localities which yield ordinary beryl, some of the finest coming from [[Russia]]. The gem-gravels of [[Sri Lanka]] contain aquamarine. Clear yellow beryl, such as occurs in [[Brazil]], is sometimes called aquamarine chrysolite. When [[corundum]] presents the bluish tint of typical aquamarine, it is often termed Oriental aquamarine. &lt;br /&gt;
&lt;br /&gt;
In the [[United States]], aquamarines can be found at the summit of [[Mount Antero|Mt. Antero]] in the [[Sawatch Range]] in central [[Colorado]]. In [[Brazil]], there are mines in the states of [[Minas Gerais]], [[Espírito Santo]] and [[Bahia]].&lt;br /&gt;
&lt;br /&gt;
The biggest aquamarine ever mined was found at the city of Marambaia, Minas Gerais. It weighed over 110 kg, and its dimensions were 48.5 cm long and 42 cm in diameter.&lt;br /&gt;
&lt;br /&gt;
==Culture and historical/mythical usage==&lt;br /&gt;
Aquamarine is the [[birthstone]] associated with [[March]]. It is also the gemstone for the 19th Anniversary. Beleif that when immersed, it has magical healing qualities.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[List of minerals]]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
* {{1911}}&lt;br /&gt;
* Diamond Bug. [http://diamondbug.blogspot.com/2006/03/flawless-aquamarine-march-birthstone.html &amp;quot;Flawless Aquamarine: March Birthstone&amp;quot;]. Retrieved March 16, 2006.&lt;br /&gt;
&lt;br /&gt;
[[Category:Silicate minerals]]&lt;br /&gt;
[[Category:Gemstones]]&lt;br /&gt;
&lt;br /&gt;
[[bg:Аквамарин]]&lt;br /&gt;
[[da:Akvamarin]]&lt;br /&gt;
[[de:Aquamarin]]&lt;br /&gt;
[[et:Akvamariin]]&lt;br /&gt;
[[fr:Aigue-marine]]&lt;br /&gt;
[[lt:Akvamarinas]]&lt;br /&gt;
[[nl:Aquamarijn]]&lt;br /&gt;
[[ja:アクアマリン]]&lt;br /&gt;
[[no:Akvamarin]]&lt;br /&gt;
[[pl:Akwamaryn]]&lt;br /&gt;
[[pt:Água-marinha]]&lt;br /&gt;
[[ru:Аквамарин]]&lt;br /&gt;
[[sl:Akvamarin (kamen)]]&lt;br /&gt;
[[vi:Berin]]&lt;br /&gt;
[[tr:Akuamarin]]&lt;br /&gt;
[[uk:Аквамарин]]&lt;/div&gt;</summary>
		<author><name>69.118.241.162</name></author>
	</entry>
	<entry>
		<id>https://ideawaza.com/index.php?title=Introduction_to_Statistics&amp;diff=17056</id>
		<title>Introduction to Statistics</title>
		<link rel="alternate" type="text/html" href="https://ideawaza.com/index.php?title=Introduction_to_Statistics&amp;diff=17056"/>
		<updated>2005-06-29T20:53:21Z</updated>

		<summary type="html">&lt;p&gt;69.118.80.7: /* Random Variables */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Preamble ==&lt;br /&gt;
Probability and statistics is the most boring thing imaginable.  It&#039;s dull, unlike fancy math -- if you&#039;re ever at a cocktail party and want to impress someone, it&#039;s a lot easier to say you&#039;re a mathematician than to say you&#039;re a statistician.  It&#039;s also pretty abstract.  Most thorough explorations of the discipline are in very dry books that are short on examples.  If fact, if you&#039;re here it&#039;s probably because you&#039;re taking a stats class somewhere and your book and lecturer totally suck.  &lt;br /&gt;
&lt;br /&gt;
This aside, statistics is a central topic in modern life, and understanding just a little bit about it will help you a lot regardless of what you do or end up doing.  I hope this web site doesn&#039;t suck.  If it does, please leave comments on the discussion tab above.&lt;br /&gt;
&lt;br /&gt;
== Experiments, Outcomes and Events ==&lt;br /&gt;
&lt;br /&gt;
The easiest way to think of probability is in terms of experiments and their potential outcomes.  Many examples can be drawn from everyday experience:  On the drive home from work, you can encounter a flat tire, or have an uneventful drive; the outcome of an election can include either a win by candidate A, B, or C, or a runoff.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Definition:&#039;&#039;&#039; The entire collection of possible outcomes from an experiment is termed the &#039;&#039;sample space&#039;&#039;, indicated as &#039;&#039;&#039;&amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The simplest (albeit uninteresting) example would be an experiment with only one possible outcome, say &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  If we remember our set theory from elementary school, we can express the sample space as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega = \{ A \} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A more interesting example is the result of rolling a six sided dice.  The sample space for this experiment is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega = \{ 1,2,3,4,5,6 \}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We may be interested in &#039;&#039;events&#039;&#039; in an experiment.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Definition:&#039;&#039;&#039; An &#039;&#039;event&#039;&#039; is some subset of outcomes from the &#039;&#039;sample space&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In the dice example, events of interest might include&amp;lt;br&amp;gt;&lt;br /&gt;
a) the outcome is an even number&amp;lt;br&amp;gt;&lt;br /&gt;
b) the outcome is less than three&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These events can be expressed in terms of the possible outcomes from the experiment: &amp;lt;br&amp;gt;&lt;br /&gt;
a) : &amp;lt;math&amp;gt; \{2,4,6\} &amp;lt;/math&amp;gt; b) : &amp;lt;math&amp;gt; \{ 1,2 \}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can borrow definitions from set theory to express events in terms of outcomes.  Here is a refresher of some terminology, and some new terms that will be important later: &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \cup &amp;lt;/math&amp;gt; represents the Union of two events&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:[http://en.wikipedia.org/wiki/Image:Venn_A_union_B.png]]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \cap &amp;lt;/math&amp;gt; represents the Interection of two events&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:[http://en.wikipedia.org/wiki/Image:Venn_A_intersect_B.png]]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\{\cdots\}^{c}&amp;lt;/math&amp;gt; represents the complement of an event.  For instance, &amp;quot;the outcome is an even number&amp;quot; is the complement of &amp;quot;the outcome is an odd number&amp;quot; in the dice example.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; A \backslash B &amp;lt;/math&amp;gt; represents &#039;&#039;difference&#039;&#039;, that is, &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; &#039;&#039;but not&#039;&#039; &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt;.  For example, we may be interested in the event of drawing the queen of spades from a deck of cards.  This can be expressed as the event of drawing a queen, but not drawing a queen of hearts, diamonds or clubs.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\varnothing&amp;lt;/math&amp;gt; or &amp;lt;math&amp;gt;\{\}&amp;lt;/math&amp;gt; represent an &#039;&#039;impossible event&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt; represents a &#039;&#039;certain event&#039;&#039; &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; are called &#039;&#039;disjoint events&#039;&#039; if &amp;lt;math&amp;gt;A\cap B = \varnothing&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Probability ==&lt;br /&gt;
Now that we know what events are, we should think a bit about a way to express the likelihood of an event occuring.  The classical definition of probability comes from the following.  If we can perform our experiment over and over in a way that is repeatable, we can count the number of times that the experiment gives rise to event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  We also keep track of the number of times that we perform the same experiment.  If we repeat the experiment a large enough number of times, we can express the probability of event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; as follows:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A) = \frac{N_{A}}{N} &amp;lt;/math&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;N_{A}&amp;lt;/math&amp;gt; is the number of times event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; occurred, and &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; is the number of times the experiment was repeated.  As &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; approaches infinity, the fraction above approaches the true probability of the event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  The value of &amp;lt;math&amp;gt;P(A)&amp;lt;/math&amp;gt; is clearly between 0 and 1.  If our event is the &#039;&#039;certain event&#039;&#039; &amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt;, then for each time we perform the experiment, the event &amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt; is observed; &amp;lt;math&amp;gt;N_{\Omega} = N&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;P(\Omega)=1&amp;lt;/math&amp;gt;.  If our event is the &#039;&#039;impossible event&#039;&#039; &amp;lt;math&amp;gt;\varnothing&amp;lt;/math&amp;gt;, we know &amp;lt;math&amp;gt;N_{\varnothing}=0&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; P(\varnothing) = 0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; are &#039;&#039;disjoint events&#039;&#039;, then whenever event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; is observed, then it is impossible for event &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; to be observed simultaneously.  Then&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;N(A\cup B) = N(A) + N(B)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Given our definition of probability, we can arrive at the following:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A\cup B) = P(A) + P(B)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At this point it&#039;s worth remembering that all events are not disjoint events.  I was originally confused by events and outcomes, and this was the source of many misunderstandings.  For events that are not disjoint, we end up with the following probability definition.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; P(A\cup B) = P(A) + P(B) - P(A\cap B)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
How can we see this from example?  Well, let&#039;s consider drawing from a deck of cards.  I&#039;ll define two &#039;&#039;events&#039;&#039;: &amp;quot;drawing a Queen&amp;quot;, and &amp;quot;drawing a Spade&amp;quot;.  We can tell off the bat that these are not disjoint events, because you can draw a queen that is also a spade.  There are four queens in the deck, so if we perform the experiment of drawing a card, putting it back in the deck and shuffling (what statisticians refer to as &#039;&#039;sampling with replacement&#039;&#039;, we will end up with a probability of &amp;lt;math&amp;gt;\frac{1}{13}&amp;lt;/math&amp;gt; for a queen draw.  By the same argument, we obtain a probability for drawing a spade as &amp;lt;math&amp;gt;\frac{1}{4}&amp;lt;/math&amp;gt;.  The expression &amp;lt;math&amp;gt;P(A\cup B)&amp;lt;/math&amp;gt; here can be translated as &amp;quot;the chance of drawing a queen or a spade&amp;quot;.  If we assume naively (as I used to) that for this case &amp;lt;math&amp;gt;P(A\cup B) = P(A) + P(B)&amp;lt;/math&amp;gt;, we can simply add our probabilities together for &amp;quot;the chance of drawing a queen or a spade&amp;quot; as &amp;lt;math&amp;gt;\frac{1}{13}+\frac{1}{4}&amp;lt;/math&amp;gt;.  If we were to gather some data experimentally, we would find that our results would differ from the prediction -- the probability observed would be slightly less than &amp;lt;math&amp;gt;\frac{1}{13}+\frac{1}{4}&amp;lt;/math&amp;gt;.  Why?  Because we&#039;re counting the queen of spades twice in our expression, once as a spade, and again as a queen.  We need to count it only once, as it can only be drawn with probability of &amp;lt;math&amp;gt;\frac{1}{52}&amp;lt;/math&amp;gt;.  [[Still confused?]] &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Proof:&#039;&#039;&#039; If &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; are not disjoint, we have to avoid the double counting problem by exactly specifying their union.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;A \cup B = A \cup (B \backslash A) &amp;lt;/math&amp;gt; so &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A \cup B) = P(A \cup (B \backslash A)) &amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B \backslash A&amp;lt;/math&amp;gt; are disjoint sets.  We can then use the definition of disjoint events from above to express our desired result:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A \cup B) = P(A) + P(B \backslash A)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
We also know that&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(B \backslash A) = P(B) - P(B\cap A)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
so&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; P(A \cup B) = P(A) + P(B) - P(B\cap A)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Whew!  Our first proof.  I hope that wasn&#039;t too too [[dry]].&lt;br /&gt;
&lt;br /&gt;
== Conditional Probability ==&lt;br /&gt;
Many events are conditional on the occurance of other events.  Sometimes this coupling is weak.  One event may become more or less probable depending on our knowledge that another event has occured.  For instance, the probability that your friends and relatives will call asking for money is likely to be higher if you win the lottery.  In my case, I don&#039;t think this probability would change.&lt;br /&gt;
&lt;br /&gt;
Let&#039;s get formal for a second and remember our original definition of probability.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A) = \frac{N_{A}}{N}&amp;lt;/math&amp;gt;&lt;br /&gt;
Consider an additional event &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt;, and a situation where we are only interested in the probability of the occurance of &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; when &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; occurs.  A way at this probability is to perform a set of experiments (&#039;&#039;trials&#039;&#039;) and only record our results when the event &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; occurs.  In other words&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \frac{N_{A\cap B}}{N_{B}} &amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
We can divide through on top and bottom by &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; the total number of trials to get &amp;lt;math&amp;gt;P(A\cap B)/P(B)&amp;lt;/math&amp;gt;.  We define this as &#039;&#039;&#039;&#039;conditional probability&#039;&#039;&#039;&#039;:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A|B) = \frac{P(A\cap B)}{P(B)}&amp;lt;/math&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
which when spoken, takes the sound &amp;quot;probability of &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; given &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt;.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[[A Totally Confusing Problem that Shows how Difficult it is to Conquer Intuition]]&lt;br /&gt;
&lt;br /&gt;
=== Bayes&#039; Law ===&lt;br /&gt;
&lt;br /&gt;
An important theorem in statistics is &#039;&#039;&#039;Bayes&#039; Law&#039;&#039;&#039;, which states that &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; P(B|A) = \frac{P(A|B)P(A)}{P(B)}&amp;lt;/math&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
It is easy to prove.  We start with identical expressions for &amp;lt;math&amp;gt;P(A\cap B)&amp;lt;/math&amp;gt;.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; P(A\cap B) = P(B\cap A) &amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; P(A\cap B) = \frac{P(A|B)}{P(B)}&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; P(B\cap A) = \frac{P(B|A)}{P(A)}&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Simple rearrangement gives us the first expression above.&lt;br /&gt;
&lt;br /&gt;
== Independence ==&lt;br /&gt;
&lt;br /&gt;
Two events &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; are called &#039;&#039;independent&#039;&#039; if &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A\cap B) = P(A)P(B)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Random Variables ==&lt;br /&gt;
&lt;br /&gt;
It&#039;s usually possible to represent the outcome of experiments in terms of integers or real numbers.  For instance, in the case of conducting a poll, it becomes a little cumbersome to present the outcomes of each individual respondant.  Let&#039;s say we poll ten people for their voting preferences (Republican - R, or Democrat - D) in two different electorial districts.  Our results might look like this:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\{RRRDRRDRRR\}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\{DDDDDRDDDD\}&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
But we&#039;re probably only interested in the overall breakdown in voting preference for each district.  If we assign an integer value to each outcome, say 0 for Democrat and 1 for Republican, we can obtain a concise summary of voting preference by district simply by adding the results together.&lt;br /&gt;
&lt;br /&gt;
== Discrete and Continuous Random Variables ==&lt;br /&gt;
&lt;br /&gt;
== Distribution Functions ==&lt;br /&gt;
&lt;br /&gt;
== Expectation Values ==&lt;/div&gt;</summary>
		<author><name>69.118.80.7</name></author>
	</entry>
	<entry>
		<id>https://ideawaza.com/index.php?title=Introduction_to_Statistics&amp;diff=17055</id>
		<title>Introduction to Statistics</title>
		<link rel="alternate" type="text/html" href="https://ideawaza.com/index.php?title=Introduction_to_Statistics&amp;diff=17055"/>
		<updated>2005-06-29T20:51:54Z</updated>

		<summary type="html">&lt;p&gt;69.118.80.7: /* Random Variables */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Preamble ==&lt;br /&gt;
Probability and statistics is the most boring thing imaginable.  It&#039;s dull, unlike fancy math -- if you&#039;re ever at a cocktail party and want to impress someone, it&#039;s a lot easier to say you&#039;re a mathematician than to say you&#039;re a statistician.  It&#039;s also pretty abstract.  Most thorough explorations of the discipline are in very dry books that are short on examples.  If fact, if you&#039;re here it&#039;s probably because you&#039;re taking a stats class somewhere and your book and lecturer totally suck.  &lt;br /&gt;
&lt;br /&gt;
This aside, statistics is a central topic in modern life, and understanding just a little bit about it will help you a lot regardless of what you do or end up doing.  I hope this web site doesn&#039;t suck.  If it does, please leave comments on the discussion tab above.&lt;br /&gt;
&lt;br /&gt;
== Experiments, Outcomes and Events ==&lt;br /&gt;
&lt;br /&gt;
The easiest way to think of probability is in terms of experiments and their potential outcomes.  Many examples can be drawn from everyday experience:  On the drive home from work, you can encounter a flat tire, or have an uneventful drive; the outcome of an election can include either a win by candidate A, B, or C, or a runoff.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Definition:&#039;&#039;&#039; The entire collection of possible outcomes from an experiment is termed the &#039;&#039;sample space&#039;&#039;, indicated as &#039;&#039;&#039;&amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The simplest (albeit uninteresting) example would be an experiment with only one possible outcome, say &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  If we remember our set theory from elementary school, we can express the sample space as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega = \{ A \} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A more interesting example is the result of rolling a six sided dice.  The sample space for this experiment is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega = \{ 1,2,3,4,5,6 \}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We may be interested in &#039;&#039;events&#039;&#039; in an experiment.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Definition:&#039;&#039;&#039; An &#039;&#039;event&#039;&#039; is some subset of outcomes from the &#039;&#039;sample space&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In the dice example, events of interest might include&amp;lt;br&amp;gt;&lt;br /&gt;
a) the outcome is an even number&amp;lt;br&amp;gt;&lt;br /&gt;
b) the outcome is less than three&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These events can be expressed in terms of the possible outcomes from the experiment: &amp;lt;br&amp;gt;&lt;br /&gt;
a) : &amp;lt;math&amp;gt; \{2,4,6\} &amp;lt;/math&amp;gt; b) : &amp;lt;math&amp;gt; \{ 1,2 \}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can borrow definitions from set theory to express events in terms of outcomes.  Here is a refresher of some terminology, and some new terms that will be important later: &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \cup &amp;lt;/math&amp;gt; represents the Union of two events&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:[http://en.wikipedia.org/wiki/Image:Venn_A_union_B.png]]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \cap &amp;lt;/math&amp;gt; represents the Interection of two events&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:[http://en.wikipedia.org/wiki/Image:Venn_A_intersect_B.png]]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\{\cdots\}^{c}&amp;lt;/math&amp;gt; represents the complement of an event.  For instance, &amp;quot;the outcome is an even number&amp;quot; is the complement of &amp;quot;the outcome is an odd number&amp;quot; in the dice example.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; A \backslash B &amp;lt;/math&amp;gt; represents &#039;&#039;difference&#039;&#039;, that is, &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; &#039;&#039;but not&#039;&#039; &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt;.  For example, we may be interested in the event of drawing the queen of spades from a deck of cards.  This can be expressed as the event of drawing a queen, but not drawing a queen of hearts, diamonds or clubs.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\varnothing&amp;lt;/math&amp;gt; or &amp;lt;math&amp;gt;\{\}&amp;lt;/math&amp;gt; represent an &#039;&#039;impossible event&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt; represents a &#039;&#039;certain event&#039;&#039; &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; are called &#039;&#039;disjoint events&#039;&#039; if &amp;lt;math&amp;gt;A\cap B = \varnothing&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Probability ==&lt;br /&gt;
Now that we know what events are, we should think a bit about a way to express the likelihood of an event occuring.  The classical definition of probability comes from the following.  If we can perform our experiment over and over in a way that is repeatable, we can count the number of times that the experiment gives rise to event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  We also keep track of the number of times that we perform the same experiment.  If we repeat the experiment a large enough number of times, we can express the probability of event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; as follows:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A) = \frac{N_{A}}{N} &amp;lt;/math&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;N_{A}&amp;lt;/math&amp;gt; is the number of times event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; occurred, and &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; is the number of times the experiment was repeated.  As &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; approaches infinity, the fraction above approaches the true probability of the event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  The value of &amp;lt;math&amp;gt;P(A)&amp;lt;/math&amp;gt; is clearly between 0 and 1.  If our event is the &#039;&#039;certain event&#039;&#039; &amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt;, then for each time we perform the experiment, the event &amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt; is observed; &amp;lt;math&amp;gt;N_{\Omega} = N&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;P(\Omega)=1&amp;lt;/math&amp;gt;.  If our event is the &#039;&#039;impossible event&#039;&#039; &amp;lt;math&amp;gt;\varnothing&amp;lt;/math&amp;gt;, we know &amp;lt;math&amp;gt;N_{\varnothing}=0&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; P(\varnothing) = 0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; are &#039;&#039;disjoint events&#039;&#039;, then whenever event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; is observed, then it is impossible for event &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; to be observed simultaneously.  Then&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;N(A\cup B) = N(A) + N(B)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Given our definition of probability, we can arrive at the following:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A\cup B) = P(A) + P(B)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At this point it&#039;s worth remembering that all events are not disjoint events.  I was originally confused by events and outcomes, and this was the source of many misunderstandings.  For events that are not disjoint, we end up with the following probability definition.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; P(A\cup B) = P(A) + P(B) - P(A\cap B)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
How can we see this from example?  Well, let&#039;s consider drawing from a deck of cards.  I&#039;ll define two &#039;&#039;events&#039;&#039;: &amp;quot;drawing a Queen&amp;quot;, and &amp;quot;drawing a Spade&amp;quot;.  We can tell off the bat that these are not disjoint events, because you can draw a queen that is also a spade.  There are four queens in the deck, so if we perform the experiment of drawing a card, putting it back in the deck and shuffling (what statisticians refer to as &#039;&#039;sampling with replacement&#039;&#039;, we will end up with a probability of &amp;lt;math&amp;gt;\frac{1}{13}&amp;lt;/math&amp;gt; for a queen draw.  By the same argument, we obtain a probability for drawing a spade as &amp;lt;math&amp;gt;\frac{1}{4}&amp;lt;/math&amp;gt;.  The expression &amp;lt;math&amp;gt;P(A\cup B)&amp;lt;/math&amp;gt; here can be translated as &amp;quot;the chance of drawing a queen or a spade&amp;quot;.  If we assume naively (as I used to) that for this case &amp;lt;math&amp;gt;P(A\cup B) = P(A) + P(B)&amp;lt;/math&amp;gt;, we can simply add our probabilities together for &amp;quot;the chance of drawing a queen or a spade&amp;quot; as &amp;lt;math&amp;gt;\frac{1}{13}+\frac{1}{4}&amp;lt;/math&amp;gt;.  If we were to gather some data experimentally, we would find that our results would differ from the prediction -- the probability observed would be slightly less than &amp;lt;math&amp;gt;\frac{1}{13}+\frac{1}{4}&amp;lt;/math&amp;gt;.  Why?  Because we&#039;re counting the queen of spades twice in our expression, once as a spade, and again as a queen.  We need to count it only once, as it can only be drawn with probability of &amp;lt;math&amp;gt;\frac{1}{52}&amp;lt;/math&amp;gt;.  [[Still confused?]] &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Proof:&#039;&#039;&#039; If &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; are not disjoint, we have to avoid the double counting problem by exactly specifying their union.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;A \cup B = A \cup (B \backslash A) &amp;lt;/math&amp;gt; so &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A \cup B) = P(A \cup (B \backslash A)) &amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B \backslash A&amp;lt;/math&amp;gt; are disjoint sets.  We can then use the definition of disjoint events from above to express our desired result:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A \cup B) = P(A) + P(B \backslash A)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
We also know that&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(B \backslash A) = P(B) - P(B\cap A)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
so&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; P(A \cup B) = P(A) + P(B) - P(B\cap A)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Whew!  Our first proof.  I hope that wasn&#039;t too too [[dry]].&lt;br /&gt;
&lt;br /&gt;
== Conditional Probability ==&lt;br /&gt;
Many events are conditional on the occurance of other events.  Sometimes this coupling is weak.  One event may become more or less probable depending on our knowledge that another event has occured.  For instance, the probability that your friends and relatives will call asking for money is likely to be higher if you win the lottery.  In my case, I don&#039;t think this probability would change.&lt;br /&gt;
&lt;br /&gt;
Let&#039;s get formal for a second and remember our original definition of probability.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A) = \frac{N_{A}}{N}&amp;lt;/math&amp;gt;&lt;br /&gt;
Consider an additional event &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt;, and a situation where we are only interested in the probability of the occurance of &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; when &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; occurs.  A way at this probability is to perform a set of experiments (&#039;&#039;trials&#039;&#039;) and only record our results when the event &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; occurs.  In other words&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \frac{N_{A\cap B}}{N_{B}} &amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
We can divide through on top and bottom by &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; the total number of trials to get &amp;lt;math&amp;gt;P(A\cap B)/P(B)&amp;lt;/math&amp;gt;.  We define this as &#039;&#039;&#039;&#039;conditional probability&#039;&#039;&#039;&#039;:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A|B) = \frac{P(A\cap B)}{P(B)}&amp;lt;/math&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
which when spoken, takes the sound &amp;quot;probability of &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; given &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt;.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[[A Totally Confusing Problem that Shows how Difficult it is to Conquer Intuition]]&lt;br /&gt;
&lt;br /&gt;
=== Bayes&#039; Law ===&lt;br /&gt;
&lt;br /&gt;
An important theorem in statistics is &#039;&#039;&#039;Bayes&#039; Law&#039;&#039;&#039;, which states that &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; P(B|A) = \frac{P(A|B)P(A)}{P(B)}&amp;lt;/math&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
It is easy to prove.  We start with identical expressions for &amp;lt;math&amp;gt;P(A\cap B)&amp;lt;/math&amp;gt;.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; P(A\cap B) = P(B\cap A) &amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; P(A\cap B) = \frac{P(A|B)}{P(B)}&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; P(B\cap A) = \frac{P(B|A)}{P(A)}&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Simple rearrangement gives us the first expression above.&lt;br /&gt;
&lt;br /&gt;
== Independence ==&lt;br /&gt;
&lt;br /&gt;
Two events &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; are called &#039;&#039;independent&#039;&#039; if &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A\cap B) = P(A)P(B)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Random Variables ==&lt;br /&gt;
&lt;br /&gt;
It&#039;s usually possible to represent the outcome of experiments in terms of integers or real numbers.  For instance, in the case of conducting a poll, it becomes a little cumbersome to present the outcomes of each individual respondant.  Let&#039;s say we poll ten people for their voting preferences (Republican - R, or Democrat - D) in two different electorial districts.  Our results might look like this:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\{RRRDRRDRRR\}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\{DDDDDRDDDD\}&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
But we&#039;re probably only interested in the overall breakdown in voting preference for each district.  If we assign an integer value to each outcome, say 0 for Democrat and 1 for Republican, we can obtain a concise summary of the voting preference district by district by adding the results together.&lt;br /&gt;
&lt;br /&gt;
== Discrete and Continuous Random Variables ==&lt;br /&gt;
&lt;br /&gt;
== Distribution Functions ==&lt;br /&gt;
&lt;br /&gt;
== Expectation Values ==&lt;/div&gt;</summary>
		<author><name>69.118.80.7</name></author>
	</entry>
	<entry>
		<id>https://ideawaza.com/index.php?title=Introduction_to_Statistics&amp;diff=17054</id>
		<title>Introduction to Statistics</title>
		<link rel="alternate" type="text/html" href="https://ideawaza.com/index.php?title=Introduction_to_Statistics&amp;diff=17054"/>
		<updated>2005-06-29T20:49:15Z</updated>

		<summary type="html">&lt;p&gt;69.118.80.7: /* Distribution Functions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Preamble ==&lt;br /&gt;
Probability and statistics is the most boring thing imaginable.  It&#039;s dull, unlike fancy math -- if you&#039;re ever at a cocktail party and want to impress someone, it&#039;s a lot easier to say you&#039;re a mathematician than to say you&#039;re a statistician.  It&#039;s also pretty abstract.  Most thorough explorations of the discipline are in very dry books that are short on examples.  If fact, if you&#039;re here it&#039;s probably because you&#039;re taking a stats class somewhere and your book and lecturer totally suck.  &lt;br /&gt;
&lt;br /&gt;
This aside, statistics is a central topic in modern life, and understanding just a little bit about it will help you a lot regardless of what you do or end up doing.  I hope this web site doesn&#039;t suck.  If it does, please leave comments on the discussion tab above.&lt;br /&gt;
&lt;br /&gt;
== Experiments, Outcomes and Events ==&lt;br /&gt;
&lt;br /&gt;
The easiest way to think of probability is in terms of experiments and their potential outcomes.  Many examples can be drawn from everyday experience:  On the drive home from work, you can encounter a flat tire, or have an uneventful drive; the outcome of an election can include either a win by candidate A, B, or C, or a runoff.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Definition:&#039;&#039;&#039; The entire collection of possible outcomes from an experiment is termed the &#039;&#039;sample space&#039;&#039;, indicated as &#039;&#039;&#039;&amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The simplest (albeit uninteresting) example would be an experiment with only one possible outcome, say &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  If we remember our set theory from elementary school, we can express the sample space as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega = \{ A \} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A more interesting example is the result of rolling a six sided dice.  The sample space for this experiment is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega = \{ 1,2,3,4,5,6 \}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We may be interested in &#039;&#039;events&#039;&#039; in an experiment.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Definition:&#039;&#039;&#039; An &#039;&#039;event&#039;&#039; is some subset of outcomes from the &#039;&#039;sample space&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In the dice example, events of interest might include&amp;lt;br&amp;gt;&lt;br /&gt;
a) the outcome is an even number&amp;lt;br&amp;gt;&lt;br /&gt;
b) the outcome is less than three&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These events can be expressed in terms of the possible outcomes from the experiment: &amp;lt;br&amp;gt;&lt;br /&gt;
a) : &amp;lt;math&amp;gt; \{2,4,6\} &amp;lt;/math&amp;gt; b) : &amp;lt;math&amp;gt; \{ 1,2 \}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can borrow definitions from set theory to express events in terms of outcomes.  Here is a refresher of some terminology, and some new terms that will be important later: &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \cup &amp;lt;/math&amp;gt; represents the Union of two events&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:[http://en.wikipedia.org/wiki/Image:Venn_A_union_B.png]]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \cap &amp;lt;/math&amp;gt; represents the Interection of two events&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:[http://en.wikipedia.org/wiki/Image:Venn_A_intersect_B.png]]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\{\cdots\}^{c}&amp;lt;/math&amp;gt; represents the complement of an event.  For instance, &amp;quot;the outcome is an even number&amp;quot; is the complement of &amp;quot;the outcome is an odd number&amp;quot; in the dice example.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; A \backslash B &amp;lt;/math&amp;gt; represents &#039;&#039;difference&#039;&#039;, that is, &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; &#039;&#039;but not&#039;&#039; &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt;.  For example, we may be interested in the event of drawing the queen of spades from a deck of cards.  This can be expressed as the event of drawing a queen, but not drawing a queen of hearts, diamonds or clubs.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\varnothing&amp;lt;/math&amp;gt; or &amp;lt;math&amp;gt;\{\}&amp;lt;/math&amp;gt; represent an &#039;&#039;impossible event&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt; represents a &#039;&#039;certain event&#039;&#039; &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; are called &#039;&#039;disjoint events&#039;&#039; if &amp;lt;math&amp;gt;A\cap B = \varnothing&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Probability ==&lt;br /&gt;
Now that we know what events are, we should think a bit about a way to express the likelihood of an event occuring.  The classical definition of probability comes from the following.  If we can perform our experiment over and over in a way that is repeatable, we can count the number of times that the experiment gives rise to event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  We also keep track of the number of times that we perform the same experiment.  If we repeat the experiment a large enough number of times, we can express the probability of event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; as follows:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A) = \frac{N_{A}}{N} &amp;lt;/math&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;N_{A}&amp;lt;/math&amp;gt; is the number of times event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; occurred, and &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; is the number of times the experiment was repeated.  As &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; approaches infinity, the fraction above approaches the true probability of the event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  The value of &amp;lt;math&amp;gt;P(A)&amp;lt;/math&amp;gt; is clearly between 0 and 1.  If our event is the &#039;&#039;certain event&#039;&#039; &amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt;, then for each time we perform the experiment, the event &amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt; is observed; &amp;lt;math&amp;gt;N_{\Omega} = N&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;P(\Omega)=1&amp;lt;/math&amp;gt;.  If our event is the &#039;&#039;impossible event&#039;&#039; &amp;lt;math&amp;gt;\varnothing&amp;lt;/math&amp;gt;, we know &amp;lt;math&amp;gt;N_{\varnothing}=0&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; P(\varnothing) = 0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; are &#039;&#039;disjoint events&#039;&#039;, then whenever event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; is observed, then it is impossible for event &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; to be observed simultaneously.  Then&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;N(A\cup B) = N(A) + N(B)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Given our definition of probability, we can arrive at the following:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A\cup B) = P(A) + P(B)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At this point it&#039;s worth remembering that all events are not disjoint events.  I was originally confused by events and outcomes, and this was the source of many misunderstandings.  For events that are not disjoint, we end up with the following probability definition.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; P(A\cup B) = P(A) + P(B) - P(A\cap B)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
How can we see this from example?  Well, let&#039;s consider drawing from a deck of cards.  I&#039;ll define two &#039;&#039;events&#039;&#039;: &amp;quot;drawing a Queen&amp;quot;, and &amp;quot;drawing a Spade&amp;quot;.  We can tell off the bat that these are not disjoint events, because you can draw a queen that is also a spade.  There are four queens in the deck, so if we perform the experiment of drawing a card, putting it back in the deck and shuffling (what statisticians refer to as &#039;&#039;sampling with replacement&#039;&#039;, we will end up with a probability of &amp;lt;math&amp;gt;\frac{1}{13}&amp;lt;/math&amp;gt; for a queen draw.  By the same argument, we obtain a probability for drawing a spade as &amp;lt;math&amp;gt;\frac{1}{4}&amp;lt;/math&amp;gt;.  The expression &amp;lt;math&amp;gt;P(A\cup B)&amp;lt;/math&amp;gt; here can be translated as &amp;quot;the chance of drawing a queen or a spade&amp;quot;.  If we assume naively (as I used to) that for this case &amp;lt;math&amp;gt;P(A\cup B) = P(A) + P(B)&amp;lt;/math&amp;gt;, we can simply add our probabilities together for &amp;quot;the chance of drawing a queen or a spade&amp;quot; as &amp;lt;math&amp;gt;\frac{1}{13}+\frac{1}{4}&amp;lt;/math&amp;gt;.  If we were to gather some data experimentally, we would find that our results would differ from the prediction -- the probability observed would be slightly less than &amp;lt;math&amp;gt;\frac{1}{13}+\frac{1}{4}&amp;lt;/math&amp;gt;.  Why?  Because we&#039;re counting the queen of spades twice in our expression, once as a spade, and again as a queen.  We need to count it only once, as it can only be drawn with probability of &amp;lt;math&amp;gt;\frac{1}{52}&amp;lt;/math&amp;gt;.  [[Still confused?]] &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Proof:&#039;&#039;&#039; If &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; are not disjoint, we have to avoid the double counting problem by exactly specifying their union.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;A \cup B = A \cup (B \backslash A) &amp;lt;/math&amp;gt; so &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A \cup B) = P(A \cup (B \backslash A)) &amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B \backslash A&amp;lt;/math&amp;gt; are disjoint sets.  We can then use the definition of disjoint events from above to express our desired result:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A \cup B) = P(A) + P(B \backslash A)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
We also know that&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(B \backslash A) = P(B) - P(B\cap A)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
so&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; P(A \cup B) = P(A) + P(B) - P(B\cap A)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Whew!  Our first proof.  I hope that wasn&#039;t too too [[dry]].&lt;br /&gt;
&lt;br /&gt;
== Conditional Probability ==&lt;br /&gt;
Many events are conditional on the occurance of other events.  Sometimes this coupling is weak.  One event may become more or less probable depending on our knowledge that another event has occured.  For instance, the probability that your friends and relatives will call asking for money is likely to be higher if you win the lottery.  In my case, I don&#039;t think this probability would change.&lt;br /&gt;
&lt;br /&gt;
Let&#039;s get formal for a second and remember our original definition of probability.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A) = \frac{N_{A}}{N}&amp;lt;/math&amp;gt;&lt;br /&gt;
Consider an additional event &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt;, and a situation where we are only interested in the probability of the occurance of &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; when &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; occurs.  A way at this probability is to perform a set of experiments (&#039;&#039;trials&#039;&#039;) and only record our results when the event &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; occurs.  In other words&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \frac{N_{A\cap B}}{N_{B}} &amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
We can divide through on top and bottom by &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; the total number of trials to get &amp;lt;math&amp;gt;P(A\cap B)/P(B)&amp;lt;/math&amp;gt;.  We define this as &#039;&#039;&#039;&#039;conditional probability&#039;&#039;&#039;&#039;:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A|B) = \frac{P(A\cap B)}{P(B)}&amp;lt;/math&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
which when spoken, takes the sound &amp;quot;probability of &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; given &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt;.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[[A Totally Confusing Problem that Shows how Difficult it is to Conquer Intuition]]&lt;br /&gt;
&lt;br /&gt;
=== Bayes&#039; Law ===&lt;br /&gt;
&lt;br /&gt;
An important theorem in statistics is &#039;&#039;&#039;Bayes&#039; Law&#039;&#039;&#039;, which states that &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; P(B|A) = \frac{P(A|B)P(A)}{P(B)}&amp;lt;/math&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
It is easy to prove.  We start with identical expressions for &amp;lt;math&amp;gt;P(A\cap B)&amp;lt;/math&amp;gt;.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; P(A\cap B) = P(B\cap A) &amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; P(A\cap B) = \frac{P(A|B)}{P(B)}&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; P(B\cap A) = \frac{P(B|A)}{P(A)}&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Simple rearrangement gives us the first expression above.&lt;br /&gt;
&lt;br /&gt;
== Independence ==&lt;br /&gt;
&lt;br /&gt;
Two events &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; are called &#039;&#039;independent&#039;&#039; if &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A\cap B) = P(A)P(B)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Random Variables ==&lt;br /&gt;
&lt;br /&gt;
It&#039;s usually possible to represent the outcome of experiments in terms of integers or real numbers.  For instance, in the case of flipping a coin, it becomes a little cumbersome to record the outcomes of multiple experiments.  Let&#039;s say we poll ten people for their voting preferences (Republican - R, or Democrat - D) in two different electorial districts.  Our results might look like this:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\{RRRDRRDRRR\}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\{DDDDDRDDDD\}&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
But we&#039;re probably only interested in the overall breakdown in voting preference for each district.  If we assign an integer value to each outcome, say 0 for Democrat and 1 for Republican, we can obtain a concise summary of the voting preference district by district by adding the results together.&lt;br /&gt;
&lt;br /&gt;
== Discrete and Continuous Random Variables ==&lt;br /&gt;
&lt;br /&gt;
== Distribution Functions ==&lt;br /&gt;
&lt;br /&gt;
== Expectation Values ==&lt;/div&gt;</summary>
		<author><name>69.118.80.7</name></author>
	</entry>
	<entry>
		<id>https://ideawaza.com/index.php?title=Introduction_to_Statistics&amp;diff=17053</id>
		<title>Introduction to Statistics</title>
		<link rel="alternate" type="text/html" href="https://ideawaza.com/index.php?title=Introduction_to_Statistics&amp;diff=17053"/>
		<updated>2005-06-29T20:41:45Z</updated>

		<summary type="html">&lt;p&gt;69.118.80.7: /* Random Variables */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Preamble ==&lt;br /&gt;
Probability and statistics is the most boring thing imaginable.  It&#039;s dull, unlike fancy math -- if you&#039;re ever at a cocktail party and want to impress someone, it&#039;s a lot easier to say you&#039;re a mathematician than to say you&#039;re a statistician.  It&#039;s also pretty abstract.  Most thorough explorations of the discipline are in very dry books that are short on examples.  If fact, if you&#039;re here it&#039;s probably because you&#039;re taking a stats class somewhere and your book and lecturer totally suck.  &lt;br /&gt;
&lt;br /&gt;
This aside, statistics is a central topic in modern life, and understanding just a little bit about it will help you a lot regardless of what you do or end up doing.  I hope this web site doesn&#039;t suck.  If it does, please leave comments on the discussion tab above.&lt;br /&gt;
&lt;br /&gt;
== Experiments, Outcomes and Events ==&lt;br /&gt;
&lt;br /&gt;
The easiest way to think of probability is in terms of experiments and their potential outcomes.  Many examples can be drawn from everyday experience:  On the drive home from work, you can encounter a flat tire, or have an uneventful drive; the outcome of an election can include either a win by candidate A, B, or C, or a runoff.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Definition:&#039;&#039;&#039; The entire collection of possible outcomes from an experiment is termed the &#039;&#039;sample space&#039;&#039;, indicated as &#039;&#039;&#039;&amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The simplest (albeit uninteresting) example would be an experiment with only one possible outcome, say &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  If we remember our set theory from elementary school, we can express the sample space as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega = \{ A \} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A more interesting example is the result of rolling a six sided dice.  The sample space for this experiment is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega = \{ 1,2,3,4,5,6 \}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We may be interested in &#039;&#039;events&#039;&#039; in an experiment.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Definition:&#039;&#039;&#039; An &#039;&#039;event&#039;&#039; is some subset of outcomes from the &#039;&#039;sample space&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In the dice example, events of interest might include&amp;lt;br&amp;gt;&lt;br /&gt;
a) the outcome is an even number&amp;lt;br&amp;gt;&lt;br /&gt;
b) the outcome is less than three&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These events can be expressed in terms of the possible outcomes from the experiment: &amp;lt;br&amp;gt;&lt;br /&gt;
a) : &amp;lt;math&amp;gt; \{2,4,6\} &amp;lt;/math&amp;gt; b) : &amp;lt;math&amp;gt; \{ 1,2 \}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can borrow definitions from set theory to express events in terms of outcomes.  Here is a refresher of some terminology, and some new terms that will be important later: &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \cup &amp;lt;/math&amp;gt; represents the Union of two events&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:[http://en.wikipedia.org/wiki/Image:Venn_A_union_B.png]]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \cap &amp;lt;/math&amp;gt; represents the Interection of two events&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:[http://en.wikipedia.org/wiki/Image:Venn_A_intersect_B.png]]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\{\cdots\}^{c}&amp;lt;/math&amp;gt; represents the complement of an event.  For instance, &amp;quot;the outcome is an even number&amp;quot; is the complement of &amp;quot;the outcome is an odd number&amp;quot; in the dice example.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; A \backslash B &amp;lt;/math&amp;gt; represents &#039;&#039;difference&#039;&#039;, that is, &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; &#039;&#039;but not&#039;&#039; &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt;.  For example, we may be interested in the event of drawing the queen of spades from a deck of cards.  This can be expressed as the event of drawing a queen, but not drawing a queen of hearts, diamonds or clubs.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\varnothing&amp;lt;/math&amp;gt; or &amp;lt;math&amp;gt;\{\}&amp;lt;/math&amp;gt; represent an &#039;&#039;impossible event&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt; represents a &#039;&#039;certain event&#039;&#039; &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; are called &#039;&#039;disjoint events&#039;&#039; if &amp;lt;math&amp;gt;A\cap B = \varnothing&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Probability ==&lt;br /&gt;
Now that we know what events are, we should think a bit about a way to express the likelihood of an event occuring.  The classical definition of probability comes from the following.  If we can perform our experiment over and over in a way that is repeatable, we can count the number of times that the experiment gives rise to event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  We also keep track of the number of times that we perform the same experiment.  If we repeat the experiment a large enough number of times, we can express the probability of event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; as follows:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A) = \frac{N_{A}}{N} &amp;lt;/math&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;N_{A}&amp;lt;/math&amp;gt; is the number of times event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; occurred, and &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; is the number of times the experiment was repeated.  As &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; approaches infinity, the fraction above approaches the true probability of the event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  The value of &amp;lt;math&amp;gt;P(A)&amp;lt;/math&amp;gt; is clearly between 0 and 1.  If our event is the &#039;&#039;certain event&#039;&#039; &amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt;, then for each time we perform the experiment, the event &amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt; is observed; &amp;lt;math&amp;gt;N_{\Omega} = N&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;P(\Omega)=1&amp;lt;/math&amp;gt;.  If our event is the &#039;&#039;impossible event&#039;&#039; &amp;lt;math&amp;gt;\varnothing&amp;lt;/math&amp;gt;, we know &amp;lt;math&amp;gt;N_{\varnothing}=0&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; P(\varnothing) = 0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; are &#039;&#039;disjoint events&#039;&#039;, then whenever event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; is observed, then it is impossible for event &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; to be observed simultaneously.  Then&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;N(A\cup B) = N(A) + N(B)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Given our definition of probability, we can arrive at the following:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A\cup B) = P(A) + P(B)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At this point it&#039;s worth remembering that all events are not disjoint events.  I was originally confused by events and outcomes, and this was the source of many misunderstandings.  For events that are not disjoint, we end up with the following probability definition.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; P(A\cup B) = P(A) + P(B) - P(A\cap B)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
How can we see this from example?  Well, let&#039;s consider drawing from a deck of cards.  I&#039;ll define two &#039;&#039;events&#039;&#039;: &amp;quot;drawing a Queen&amp;quot;, and &amp;quot;drawing a Spade&amp;quot;.  We can tell off the bat that these are not disjoint events, because you can draw a queen that is also a spade.  There are four queens in the deck, so if we perform the experiment of drawing a card, putting it back in the deck and shuffling (what statisticians refer to as &#039;&#039;sampling with replacement&#039;&#039;, we will end up with a probability of &amp;lt;math&amp;gt;\frac{1}{13}&amp;lt;/math&amp;gt; for a queen draw.  By the same argument, we obtain a probability for drawing a spade as &amp;lt;math&amp;gt;\frac{1}{4}&amp;lt;/math&amp;gt;.  The expression &amp;lt;math&amp;gt;P(A\cup B)&amp;lt;/math&amp;gt; here can be translated as &amp;quot;the chance of drawing a queen or a spade&amp;quot;.  If we assume naively (as I used to) that for this case &amp;lt;math&amp;gt;P(A\cup B) = P(A) + P(B)&amp;lt;/math&amp;gt;, we can simply add our probabilities together for &amp;quot;the chance of drawing a queen or a spade&amp;quot; as &amp;lt;math&amp;gt;\frac{1}{13}+\frac{1}{4}&amp;lt;/math&amp;gt;.  If we were to gather some data experimentally, we would find that our results would differ from the prediction -- the probability observed would be slightly less than &amp;lt;math&amp;gt;\frac{1}{13}+\frac{1}{4}&amp;lt;/math&amp;gt;.  Why?  Because we&#039;re counting the queen of spades twice in our expression, once as a spade, and again as a queen.  We need to count it only once, as it can only be drawn with probability of &amp;lt;math&amp;gt;\frac{1}{52}&amp;lt;/math&amp;gt;.  [[Still confused?]] &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Proof:&#039;&#039;&#039; If &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; are not disjoint, we have to avoid the double counting problem by exactly specifying their union.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;A \cup B = A \cup (B \backslash A) &amp;lt;/math&amp;gt; so &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A \cup B) = P(A \cup (B \backslash A)) &amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B \backslash A&amp;lt;/math&amp;gt; are disjoint sets.  We can then use the definition of disjoint events from above to express our desired result:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A \cup B) = P(A) + P(B \backslash A)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
We also know that&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(B \backslash A) = P(B) - P(B\cap A)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
so&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; P(A \cup B) = P(A) + P(B) - P(B\cap A)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Whew!  Our first proof.  I hope that wasn&#039;t too too [[dry]].&lt;br /&gt;
&lt;br /&gt;
== Conditional Probability ==&lt;br /&gt;
Many events are conditional on the occurance of other events.  Sometimes this coupling is weak.  One event may become more or less probable depending on our knowledge that another event has occured.  For instance, the probability that your friends and relatives will call asking for money is likely to be higher if you win the lottery.  In my case, I don&#039;t think this probability would change.&lt;br /&gt;
&lt;br /&gt;
Let&#039;s get formal for a second and remember our original definition of probability.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A) = \frac{N_{A}}{N}&amp;lt;/math&amp;gt;&lt;br /&gt;
Consider an additional event &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt;, and a situation where we are only interested in the probability of the occurance of &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; when &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; occurs.  A way at this probability is to perform a set of experiments (&#039;&#039;trials&#039;&#039;) and only record our results when the event &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; occurs.  In other words&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \frac{N_{A\cap B}}{N_{B}} &amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
We can divide through on top and bottom by &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; the total number of trials to get &amp;lt;math&amp;gt;P(A\cap B)/P(B)&amp;lt;/math&amp;gt;.  We define this as &#039;&#039;&#039;&#039;conditional probability&#039;&#039;&#039;&#039;:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A|B) = \frac{P(A\cap B)}{P(B)}&amp;lt;/math&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
which when spoken, takes the sound &amp;quot;probability of &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; given &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt;.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[[A Totally Confusing Problem that Shows how Difficult it is to Conquer Intuition]]&lt;br /&gt;
&lt;br /&gt;
=== Bayes&#039; Law ===&lt;br /&gt;
&lt;br /&gt;
An important theorem in statistics is &#039;&#039;&#039;Bayes&#039; Law&#039;&#039;&#039;, which states that &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; P(B|A) = \frac{P(A|B)P(A)}{P(B)}&amp;lt;/math&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
It is easy to prove.  We start with identical expressions for &amp;lt;math&amp;gt;P(A\cap B)&amp;lt;/math&amp;gt;.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; P(A\cap B) = P(B\cap A) &amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; P(A\cap B) = \frac{P(A|B)}{P(B)}&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; P(B\cap A) = \frac{P(B|A)}{P(A)}&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Simple rearrangement gives us the first expression above.&lt;br /&gt;
&lt;br /&gt;
== Independence ==&lt;br /&gt;
&lt;br /&gt;
Two events &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; are called &#039;&#039;independent&#039;&#039; if &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A\cap B) = P(A)P(B)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Random Variables ==&lt;br /&gt;
&lt;br /&gt;
It&#039;s usually possible to represent the outcome of experiments in terms of integers or real numbers.  For instance, in the case of flipping a coin, it becomes a little cumbersome to record the outcomes of multiple experiments.  Let&#039;s say we poll ten people for their voting preferences (Republican - R, or Democrat - D) in two different electorial districts.  Our results might look like this:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\{RRRDRRDRRR\}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\{DDDDDRDDDD\}&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
But we&#039;re probably only interested in the overall breakdown in voting preference for each district.  If we assign an integer value to each outcome, say 0 for Democrat and 1 for Republican, we can obtain a concise summary of the voting preference district by district by adding the results together.&lt;br /&gt;
&lt;br /&gt;
== Discrete and Continuous Random Variables ==&lt;br /&gt;
&lt;br /&gt;
== Distribution Functions ==&lt;/div&gt;</summary>
		<author><name>69.118.80.7</name></author>
	</entry>
	<entry>
		<id>https://ideawaza.com/index.php?title=Introduction_to_Statistics&amp;diff=17052</id>
		<title>Introduction to Statistics</title>
		<link rel="alternate" type="text/html" href="https://ideawaza.com/index.php?title=Introduction_to_Statistics&amp;diff=17052"/>
		<updated>2005-06-29T20:34:34Z</updated>

		<summary type="html">&lt;p&gt;69.118.80.7: /* Random Variables */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Preamble ==&lt;br /&gt;
Probability and statistics is the most boring thing imaginable.  It&#039;s dull, unlike fancy math -- if you&#039;re ever at a cocktail party and want to impress someone, it&#039;s a lot easier to say you&#039;re a mathematician than to say you&#039;re a statistician.  It&#039;s also pretty abstract.  Most thorough explorations of the discipline are in very dry books that are short on examples.  If fact, if you&#039;re here it&#039;s probably because you&#039;re taking a stats class somewhere and your book and lecturer totally suck.  &lt;br /&gt;
&lt;br /&gt;
This aside, statistics is a central topic in modern life, and understanding just a little bit about it will help you a lot regardless of what you do or end up doing.  I hope this web site doesn&#039;t suck.  If it does, please leave comments on the discussion tab above.&lt;br /&gt;
&lt;br /&gt;
== Experiments, Outcomes and Events ==&lt;br /&gt;
&lt;br /&gt;
The easiest way to think of probability is in terms of experiments and their potential outcomes.  Many examples can be drawn from everyday experience:  On the drive home from work, you can encounter a flat tire, or have an uneventful drive; the outcome of an election can include either a win by candidate A, B, or C, or a runoff.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Definition:&#039;&#039;&#039; The entire collection of possible outcomes from an experiment is termed the &#039;&#039;sample space&#039;&#039;, indicated as &#039;&#039;&#039;&amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The simplest (albeit uninteresting) example would be an experiment with only one possible outcome, say &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  If we remember our set theory from elementary school, we can express the sample space as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega = \{ A \} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A more interesting example is the result of rolling a six sided dice.  The sample space for this experiment is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega = \{ 1,2,3,4,5,6 \}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We may be interested in &#039;&#039;events&#039;&#039; in an experiment.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Definition:&#039;&#039;&#039; An &#039;&#039;event&#039;&#039; is some subset of outcomes from the &#039;&#039;sample space&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In the dice example, events of interest might include&amp;lt;br&amp;gt;&lt;br /&gt;
a) the outcome is an even number&amp;lt;br&amp;gt;&lt;br /&gt;
b) the outcome is less than three&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These events can be expressed in terms of the possible outcomes from the experiment: &amp;lt;br&amp;gt;&lt;br /&gt;
a) : &amp;lt;math&amp;gt; \{2,4,6\} &amp;lt;/math&amp;gt; b) : &amp;lt;math&amp;gt; \{ 1,2 \}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can borrow definitions from set theory to express events in terms of outcomes.  Here is a refresher of some terminology, and some new terms that will be important later: &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \cup &amp;lt;/math&amp;gt; represents the Union of two events&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:[http://en.wikipedia.org/wiki/Image:Venn_A_union_B.png]]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \cap &amp;lt;/math&amp;gt; represents the Interection of two events&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:[http://en.wikipedia.org/wiki/Image:Venn_A_intersect_B.png]]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\{\cdots\}^{c}&amp;lt;/math&amp;gt; represents the complement of an event.  For instance, &amp;quot;the outcome is an even number&amp;quot; is the complement of &amp;quot;the outcome is an odd number&amp;quot; in the dice example.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; A \backslash B &amp;lt;/math&amp;gt; represents &#039;&#039;difference&#039;&#039;, that is, &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; &#039;&#039;but not&#039;&#039; &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt;.  For example, we may be interested in the event of drawing the queen of spades from a deck of cards.  This can be expressed as the event of drawing a queen, but not drawing a queen of hearts, diamonds or clubs.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\varnothing&amp;lt;/math&amp;gt; or &amp;lt;math&amp;gt;\{\}&amp;lt;/math&amp;gt; represent an &#039;&#039;impossible event&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt; represents a &#039;&#039;certain event&#039;&#039; &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; are called &#039;&#039;disjoint events&#039;&#039; if &amp;lt;math&amp;gt;A\cap B = \varnothing&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Probability ==&lt;br /&gt;
Now that we know what events are, we should think a bit about a way to express the likelihood of an event occuring.  The classical definition of probability comes from the following.  If we can perform our experiment over and over in a way that is repeatable, we can count the number of times that the experiment gives rise to event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  We also keep track of the number of times that we perform the same experiment.  If we repeat the experiment a large enough number of times, we can express the probability of event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; as follows:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A) = \frac{N_{A}}{N} &amp;lt;/math&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;N_{A}&amp;lt;/math&amp;gt; is the number of times event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; occurred, and &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; is the number of times the experiment was repeated.  As &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; approaches infinity, the fraction above approaches the true probability of the event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  The value of &amp;lt;math&amp;gt;P(A)&amp;lt;/math&amp;gt; is clearly between 0 and 1.  If our event is the &#039;&#039;certain event&#039;&#039; &amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt;, then for each time we perform the experiment, the event &amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt; is observed; &amp;lt;math&amp;gt;N_{\Omega} = N&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;P(\Omega)=1&amp;lt;/math&amp;gt;.  If our event is the &#039;&#039;impossible event&#039;&#039; &amp;lt;math&amp;gt;\varnothing&amp;lt;/math&amp;gt;, we know &amp;lt;math&amp;gt;N_{\varnothing}=0&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; P(\varnothing) = 0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; are &#039;&#039;disjoint events&#039;&#039;, then whenever event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; is observed, then it is impossible for event &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; to be observed simultaneously.  Then&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;N(A\cup B) = N(A) + N(B)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Given our definition of probability, we can arrive at the following:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A\cup B) = P(A) + P(B)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At this point it&#039;s worth remembering that all events are not disjoint events.  I was originally confused by events and outcomes, and this was the source of many misunderstandings.  For events that are not disjoint, we end up with the following probability definition.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; P(A\cup B) = P(A) + P(B) - P(A\cap B)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
How can we see this from example?  Well, let&#039;s consider drawing from a deck of cards.  I&#039;ll define two &#039;&#039;events&#039;&#039;: &amp;quot;drawing a Queen&amp;quot;, and &amp;quot;drawing a Spade&amp;quot;.  We can tell off the bat that these are not disjoint events, because you can draw a queen that is also a spade.  There are four queens in the deck, so if we perform the experiment of drawing a card, putting it back in the deck and shuffling (what statisticians refer to as &#039;&#039;sampling with replacement&#039;&#039;, we will end up with a probability of &amp;lt;math&amp;gt;\frac{1}{13}&amp;lt;/math&amp;gt; for a queen draw.  By the same argument, we obtain a probability for drawing a spade as &amp;lt;math&amp;gt;\frac{1}{4}&amp;lt;/math&amp;gt;.  The expression &amp;lt;math&amp;gt;P(A\cup B)&amp;lt;/math&amp;gt; here can be translated as &amp;quot;the chance of drawing a queen or a spade&amp;quot;.  If we assume naively (as I used to) that for this case &amp;lt;math&amp;gt;P(A\cup B) = P(A) + P(B)&amp;lt;/math&amp;gt;, we can simply add our probabilities together for &amp;quot;the chance of drawing a queen or a spade&amp;quot; as &amp;lt;math&amp;gt;\frac{1}{13}+\frac{1}{4}&amp;lt;/math&amp;gt;.  If we were to gather some data experimentally, we would find that our results would differ from the prediction -- the probability observed would be slightly less than &amp;lt;math&amp;gt;\frac{1}{13}+\frac{1}{4}&amp;lt;/math&amp;gt;.  Why?  Because we&#039;re counting the queen of spades twice in our expression, once as a spade, and again as a queen.  We need to count it only once, as it can only be drawn with probability of &amp;lt;math&amp;gt;\frac{1}{52}&amp;lt;/math&amp;gt;.  [[Still confused?]] &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Proof:&#039;&#039;&#039; If &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; are not disjoint, we have to avoid the double counting problem by exactly specifying their union.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;A \cup B = A \cup (B \backslash A) &amp;lt;/math&amp;gt; so &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A \cup B) = P(A \cup (B \backslash A)) &amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B \backslash A&amp;lt;/math&amp;gt; are disjoint sets.  We can then use the definition of disjoint events from above to express our desired result:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A \cup B) = P(A) + P(B \backslash A)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
We also know that&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(B \backslash A) = P(B) - P(B\cap A)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
so&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; P(A \cup B) = P(A) + P(B) - P(B\cap A)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Whew!  Our first proof.  I hope that wasn&#039;t too too [[dry]].&lt;br /&gt;
&lt;br /&gt;
== Conditional Probability ==&lt;br /&gt;
Many events are conditional on the occurance of other events.  Sometimes this coupling is weak.  One event may become more or less probable depending on our knowledge that another event has occured.  For instance, the probability that your friends and relatives will call asking for money is likely to be higher if you win the lottery.  In my case, I don&#039;t think this probability would change.&lt;br /&gt;
&lt;br /&gt;
Let&#039;s get formal for a second and remember our original definition of probability.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A) = \frac{N_{A}}{N}&amp;lt;/math&amp;gt;&lt;br /&gt;
Consider an additional event &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt;, and a situation where we are only interested in the probability of the occurance of &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; when &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; occurs.  A way at this probability is to perform a set of experiments (&#039;&#039;trials&#039;&#039;) and only record our results when the event &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; occurs.  In other words&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \frac{N_{A\cap B}}{N_{B}} &amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
We can divide through on top and bottom by &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; the total number of trials to get &amp;lt;math&amp;gt;P(A\cap B)/P(B)&amp;lt;/math&amp;gt;.  We define this as &#039;&#039;&#039;&#039;conditional probability&#039;&#039;&#039;&#039;:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A|B) = \frac{P(A\cap B)}{P(B)}&amp;lt;/math&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
which when spoken, takes the sound &amp;quot;probability of &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; given &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt;.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[[A Totally Confusing Problem that Shows how Difficult it is to Conquer Intuition]]&lt;br /&gt;
&lt;br /&gt;
=== Bayes&#039; Law ===&lt;br /&gt;
&lt;br /&gt;
An important theorem in statistics is &#039;&#039;&#039;Bayes&#039; Law&#039;&#039;&#039;, which states that &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; P(B|A) = \frac{P(A|B)P(A)}{P(B)}&amp;lt;/math&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
It is easy to prove.  We start with identical expressions for &amp;lt;math&amp;gt;P(A\cap B)&amp;lt;/math&amp;gt;.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; P(A\cap B) = P(B\cap A) &amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; P(A\cap B) = \frac{P(A|B)}{P(B)}&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; P(B\cap A) = \frac{P(B|A)}{P(A)}&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Simple rearrangement gives us the first expression above.&lt;br /&gt;
&lt;br /&gt;
== Independence ==&lt;br /&gt;
&lt;br /&gt;
Two events &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; are called &#039;&#039;independent&#039;&#039; if &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A\cap B) = P(A)P(B)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Random Variables ==&lt;br /&gt;
&lt;br /&gt;
It&#039;s usually possible to represent the outcome of experiments in terms of integers or real numbers.  For instance, in the case of flipping a coin, it becomes a little cumbersome to record the outcomes of multiple experiments.  Let&#039;s say we poll ten people for their voting preferences (Republican - R, or Democrat - D) in two different electorial districts.  Our results might look like this:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\{RRRDRRDRRR\}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\{DDDDDRDDDD\}&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
But we&#039;re probably only interested in the overall breakdown in voting preference for each district.  If we assign an integer value to each outcome, say 0 for Democrat and 1 for Republican, we can obtain a concise summary of the voting preference district by district by adding the results together.&lt;/div&gt;</summary>
		<author><name>69.118.80.7</name></author>
	</entry>
	<entry>
		<id>https://ideawaza.com/index.php?title=Introduction_to_Statistics&amp;diff=17051</id>
		<title>Introduction to Statistics</title>
		<link rel="alternate" type="text/html" href="https://ideawaza.com/index.php?title=Introduction_to_Statistics&amp;diff=17051"/>
		<updated>2005-06-29T20:25:34Z</updated>

		<summary type="html">&lt;p&gt;69.118.80.7: /* Random Variables */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Preamble ==&lt;br /&gt;
Probability and statistics is the most boring thing imaginable.  It&#039;s dull, unlike fancy math -- if you&#039;re ever at a cocktail party and want to impress someone, it&#039;s a lot easier to say you&#039;re a mathematician than to say you&#039;re a statistician.  It&#039;s also pretty abstract.  Most thorough explorations of the discipline are in very dry books that are short on examples.  If fact, if you&#039;re here it&#039;s probably because you&#039;re taking a stats class somewhere and your book and lecturer totally suck.  &lt;br /&gt;
&lt;br /&gt;
This aside, statistics is a central topic in modern life, and understanding just a little bit about it will help you a lot regardless of what you do or end up doing.  I hope this web site doesn&#039;t suck.  If it does, please leave comments on the discussion tab above.&lt;br /&gt;
&lt;br /&gt;
== Experiments, Outcomes and Events ==&lt;br /&gt;
&lt;br /&gt;
The easiest way to think of probability is in terms of experiments and their potential outcomes.  Many examples can be drawn from everyday experience:  On the drive home from work, you can encounter a flat tire, or have an uneventful drive; the outcome of an election can include either a win by candidate A, B, or C, or a runoff.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Definition:&#039;&#039;&#039; The entire collection of possible outcomes from an experiment is termed the &#039;&#039;sample space&#039;&#039;, indicated as &#039;&#039;&#039;&amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The simplest (albeit uninteresting) example would be an experiment with only one possible outcome, say &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  If we remember our set theory from elementary school, we can express the sample space as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega = \{ A \} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A more interesting example is the result of rolling a six sided dice.  The sample space for this experiment is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega = \{ 1,2,3,4,5,6 \}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We may be interested in &#039;&#039;events&#039;&#039; in an experiment.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Definition:&#039;&#039;&#039; An &#039;&#039;event&#039;&#039; is some subset of outcomes from the &#039;&#039;sample space&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In the dice example, events of interest might include&amp;lt;br&amp;gt;&lt;br /&gt;
a) the outcome is an even number&amp;lt;br&amp;gt;&lt;br /&gt;
b) the outcome is less than three&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These events can be expressed in terms of the possible outcomes from the experiment: &amp;lt;br&amp;gt;&lt;br /&gt;
a) : &amp;lt;math&amp;gt; \{2,4,6\} &amp;lt;/math&amp;gt; b) : &amp;lt;math&amp;gt; \{ 1,2 \}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can borrow definitions from set theory to express events in terms of outcomes.  Here is a refresher of some terminology, and some new terms that will be important later: &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \cup &amp;lt;/math&amp;gt; represents the Union of two events&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:[http://en.wikipedia.org/wiki/Image:Venn_A_union_B.png]]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \cap &amp;lt;/math&amp;gt; represents the Interection of two events&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:[http://en.wikipedia.org/wiki/Image:Venn_A_intersect_B.png]]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\{\cdots\}^{c}&amp;lt;/math&amp;gt; represents the complement of an event.  For instance, &amp;quot;the outcome is an even number&amp;quot; is the complement of &amp;quot;the outcome is an odd number&amp;quot; in the dice example.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; A \backslash B &amp;lt;/math&amp;gt; represents &#039;&#039;difference&#039;&#039;, that is, &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; &#039;&#039;but not&#039;&#039; &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt;.  For example, we may be interested in the event of drawing the queen of spades from a deck of cards.  This can be expressed as the event of drawing a queen, but not drawing a queen of hearts, diamonds or clubs.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\varnothing&amp;lt;/math&amp;gt; or &amp;lt;math&amp;gt;\{\}&amp;lt;/math&amp;gt; represent an &#039;&#039;impossible event&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt; represents a &#039;&#039;certain event&#039;&#039; &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; are called &#039;&#039;disjoint events&#039;&#039; if &amp;lt;math&amp;gt;A\cap B = \varnothing&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Probability ==&lt;br /&gt;
Now that we know what events are, we should think a bit about a way to express the likelihood of an event occuring.  The classical definition of probability comes from the following.  If we can perform our experiment over and over in a way that is repeatable, we can count the number of times that the experiment gives rise to event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  We also keep track of the number of times that we perform the same experiment.  If we repeat the experiment a large enough number of times, we can express the probability of event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; as follows:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A) = \frac{N_{A}}{N} &amp;lt;/math&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;N_{A}&amp;lt;/math&amp;gt; is the number of times event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; occurred, and &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; is the number of times the experiment was repeated.  As &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; approaches infinity, the fraction above approaches the true probability of the event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  The value of &amp;lt;math&amp;gt;P(A)&amp;lt;/math&amp;gt; is clearly between 0 and 1.  If our event is the &#039;&#039;certain event&#039;&#039; &amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt;, then for each time we perform the experiment, the event &amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt; is observed; &amp;lt;math&amp;gt;N_{\Omega} = N&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;P(\Omega)=1&amp;lt;/math&amp;gt;.  If our event is the &#039;&#039;impossible event&#039;&#039; &amp;lt;math&amp;gt;\varnothing&amp;lt;/math&amp;gt;, we know &amp;lt;math&amp;gt;N_{\varnothing}=0&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; P(\varnothing) = 0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; are &#039;&#039;disjoint events&#039;&#039;, then whenever event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; is observed, then it is impossible for event &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; to be observed simultaneously.  Then&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;N(A\cup B) = N(A) + N(B)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Given our definition of probability, we can arrive at the following:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A\cup B) = P(A) + P(B)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At this point it&#039;s worth remembering that all events are not disjoint events.  I was originally confused by events and outcomes, and this was the source of many misunderstandings.  For events that are not disjoint, we end up with the following probability definition.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; P(A\cup B) = P(A) + P(B) - P(A\cap B)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
How can we see this from example?  Well, let&#039;s consider drawing from a deck of cards.  I&#039;ll define two &#039;&#039;events&#039;&#039;: &amp;quot;drawing a Queen&amp;quot;, and &amp;quot;drawing a Spade&amp;quot;.  We can tell off the bat that these are not disjoint events, because you can draw a queen that is also a spade.  There are four queens in the deck, so if we perform the experiment of drawing a card, putting it back in the deck and shuffling (what statisticians refer to as &#039;&#039;sampling with replacement&#039;&#039;, we will end up with a probability of &amp;lt;math&amp;gt;\frac{1}{13}&amp;lt;/math&amp;gt; for a queen draw.  By the same argument, we obtain a probability for drawing a spade as &amp;lt;math&amp;gt;\frac{1}{4}&amp;lt;/math&amp;gt;.  The expression &amp;lt;math&amp;gt;P(A\cup B)&amp;lt;/math&amp;gt; here can be translated as &amp;quot;the chance of drawing a queen or a spade&amp;quot;.  If we assume naively (as I used to) that for this case &amp;lt;math&amp;gt;P(A\cup B) = P(A) + P(B)&amp;lt;/math&amp;gt;, we can simply add our probabilities together for &amp;quot;the chance of drawing a queen or a spade&amp;quot; as &amp;lt;math&amp;gt;\frac{1}{13}+\frac{1}{4}&amp;lt;/math&amp;gt;.  If we were to gather some data experimentally, we would find that our results would differ from the prediction -- the probability observed would be slightly less than &amp;lt;math&amp;gt;\frac{1}{13}+\frac{1}{4}&amp;lt;/math&amp;gt;.  Why?  Because we&#039;re counting the queen of spades twice in our expression, once as a spade, and again as a queen.  We need to count it only once, as it can only be drawn with probability of &amp;lt;math&amp;gt;\frac{1}{52}&amp;lt;/math&amp;gt;.  [[Still confused?]] &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Proof:&#039;&#039;&#039; If &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; are not disjoint, we have to avoid the double counting problem by exactly specifying their union.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;A \cup B = A \cup (B \backslash A) &amp;lt;/math&amp;gt; so &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A \cup B) = P(A \cup (B \backslash A)) &amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B \backslash A&amp;lt;/math&amp;gt; are disjoint sets.  We can then use the definition of disjoint events from above to express our desired result:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A \cup B) = P(A) + P(B \backslash A)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
We also know that&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(B \backslash A) = P(B) - P(B\cap A)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
so&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; P(A \cup B) = P(A) + P(B) - P(B\cap A)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Whew!  Our first proof.  I hope that wasn&#039;t too too [[dry]].&lt;br /&gt;
&lt;br /&gt;
== Conditional Probability ==&lt;br /&gt;
Many events are conditional on the occurance of other events.  Sometimes this coupling is weak.  One event may become more or less probable depending on our knowledge that another event has occured.  For instance, the probability that your friends and relatives will call asking for money is likely to be higher if you win the lottery.  In my case, I don&#039;t think this probability would change.&lt;br /&gt;
&lt;br /&gt;
Let&#039;s get formal for a second and remember our original definition of probability.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A) = \frac{N_{A}}{N}&amp;lt;/math&amp;gt;&lt;br /&gt;
Consider an additional event &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt;, and a situation where we are only interested in the probability of the occurance of &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; when &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; occurs.  A way at this probability is to perform a set of experiments (&#039;&#039;trials&#039;&#039;) and only record our results when the event &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; occurs.  In other words&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \frac{N_{A\cap B}}{N_{B}} &amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
We can divide through on top and bottom by &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; the total number of trials to get &amp;lt;math&amp;gt;P(A\cap B)/P(B)&amp;lt;/math&amp;gt;.  We define this as &#039;&#039;&#039;&#039;conditional probability&#039;&#039;&#039;&#039;:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A|B) = \frac{P(A\cap B)}{P(B)}&amp;lt;/math&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
which when spoken, takes the sound &amp;quot;probability of &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; given &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt;.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[[A Totally Confusing Problem that Shows how Difficult it is to Conquer Intuition]]&lt;br /&gt;
&lt;br /&gt;
=== Bayes&#039; Law ===&lt;br /&gt;
&lt;br /&gt;
An important theorem in statistics is &#039;&#039;&#039;Bayes&#039; Law&#039;&#039;&#039;, which states that &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; P(B|A) = \frac{P(A|B)P(A)}{P(B)}&amp;lt;/math&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
It is easy to prove.  We start with identical expressions for &amp;lt;math&amp;gt;P(A\cap B)&amp;lt;/math&amp;gt;.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; P(A\cap B) = P(B\cap A) &amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; P(A\cap B) = \frac{P(A|B)}{P(B)}&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; P(B\cap A) = \frac{P(B|A)}{P(A)}&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Simple rearrangement gives us the first expression above.&lt;br /&gt;
&lt;br /&gt;
== Independence ==&lt;br /&gt;
&lt;br /&gt;
Two events &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; are called &#039;&#039;independent&#039;&#039; if &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A\cap B) = P(A)P(B)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Random Variables ==&lt;br /&gt;
&lt;br /&gt;
It&#039;s usually possible to represent the outcome of experiments in terms of a representation involving integers or real numbers.  For instance, in the case of flipping a coin, it becomes a little cumbersome to record the outcomes of multiple experiments.  Let&#039;s say we flip a coin four times, and repeat this experiment twice.  We might have gotten the following outcomes from the two experiments.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\{HHTH\}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\{TTHH\}&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
But if we&#039;re only really interested in the number of times that the coin turns up heads in four flips, we can assign an integer value of 0 to Tails and 1 to Heads.  Adding the the values together for each experiment gives us what we were after in the first place.&lt;/div&gt;</summary>
		<author><name>69.118.80.7</name></author>
	</entry>
	<entry>
		<id>https://ideawaza.com/index.php?title=Introduction_to_Statistics&amp;diff=17050</id>
		<title>Introduction to Statistics</title>
		<link rel="alternate" type="text/html" href="https://ideawaza.com/index.php?title=Introduction_to_Statistics&amp;diff=17050"/>
		<updated>2005-06-29T20:13:11Z</updated>

		<summary type="html">&lt;p&gt;69.118.80.7: /* Random Variables */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Preamble ==&lt;br /&gt;
Probability and statistics is the most boring thing imaginable.  It&#039;s dull, unlike fancy math -- if you&#039;re ever at a cocktail party and want to impress someone, it&#039;s a lot easier to say you&#039;re a mathematician than to say you&#039;re a statistician.  It&#039;s also pretty abstract.  Most thorough explorations of the discipline are in very dry books that are short on examples.  If fact, if you&#039;re here it&#039;s probably because you&#039;re taking a stats class somewhere and your book and lecturer totally suck.  &lt;br /&gt;
&lt;br /&gt;
This aside, statistics is a central topic in modern life, and understanding just a little bit about it will help you a lot regardless of what you do or end up doing.  I hope this web site doesn&#039;t suck.  If it does, please leave comments on the discussion tab above.&lt;br /&gt;
&lt;br /&gt;
== Experiments, Outcomes and Events ==&lt;br /&gt;
&lt;br /&gt;
The easiest way to think of probability is in terms of experiments and their potential outcomes.  Many examples can be drawn from everyday experience:  On the drive home from work, you can encounter a flat tire, or have an uneventful drive; the outcome of an election can include either a win by candidate A, B, or C, or a runoff.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Definition:&#039;&#039;&#039; The entire collection of possible outcomes from an experiment is termed the &#039;&#039;sample space&#039;&#039;, indicated as &#039;&#039;&#039;&amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The simplest (albeit uninteresting) example would be an experiment with only one possible outcome, say &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  If we remember our set theory from elementary school, we can express the sample space as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega = \{ A \} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A more interesting example is the result of rolling a six sided dice.  The sample space for this experiment is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega = \{ 1,2,3,4,5,6 \}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We may be interested in &#039;&#039;events&#039;&#039; in an experiment.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Definition:&#039;&#039;&#039; An &#039;&#039;event&#039;&#039; is some subset of outcomes from the &#039;&#039;sample space&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In the dice example, events of interest might include&amp;lt;br&amp;gt;&lt;br /&gt;
a) the outcome is an even number&amp;lt;br&amp;gt;&lt;br /&gt;
b) the outcome is less than three&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These events can be expressed in terms of the possible outcomes from the experiment: &amp;lt;br&amp;gt;&lt;br /&gt;
a) : &amp;lt;math&amp;gt; \{2,4,6\} &amp;lt;/math&amp;gt; b) : &amp;lt;math&amp;gt; \{ 1,2 \}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can borrow definitions from set theory to express events in terms of outcomes.  Here is a refresher of some terminology, and some new terms that will be important later: &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \cup &amp;lt;/math&amp;gt; represents the Union of two events&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:[http://en.wikipedia.org/wiki/Image:Venn_A_union_B.png]]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \cap &amp;lt;/math&amp;gt; represents the Interection of two events&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:[http://en.wikipedia.org/wiki/Image:Venn_A_intersect_B.png]]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\{\cdots\}^{c}&amp;lt;/math&amp;gt; represents the complement of an event.  For instance, &amp;quot;the outcome is an even number&amp;quot; is the complement of &amp;quot;the outcome is an odd number&amp;quot; in the dice example.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; A \backslash B &amp;lt;/math&amp;gt; represents &#039;&#039;difference&#039;&#039;, that is, &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; &#039;&#039;but not&#039;&#039; &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt;.  For example, we may be interested in the event of drawing the queen of spades from a deck of cards.  This can be expressed as the event of drawing a queen, but not drawing a queen of hearts, diamonds or clubs.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\varnothing&amp;lt;/math&amp;gt; or &amp;lt;math&amp;gt;\{\}&amp;lt;/math&amp;gt; represent an &#039;&#039;impossible event&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt; represents a &#039;&#039;certain event&#039;&#039; &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; are called &#039;&#039;disjoint events&#039;&#039; if &amp;lt;math&amp;gt;A\cap B = \varnothing&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Probability ==&lt;br /&gt;
Now that we know what events are, we should think a bit about a way to express the likelihood of an event occuring.  The classical definition of probability comes from the following.  If we can perform our experiment over and over in a way that is repeatable, we can count the number of times that the experiment gives rise to event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  We also keep track of the number of times that we perform the same experiment.  If we repeat the experiment a large enough number of times, we can express the probability of event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; as follows:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A) = \frac{N_{A}}{N} &amp;lt;/math&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;N_{A}&amp;lt;/math&amp;gt; is the number of times event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; occurred, and &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; is the number of times the experiment was repeated.  As &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; approaches infinity, the fraction above approaches the true probability of the event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  The value of &amp;lt;math&amp;gt;P(A)&amp;lt;/math&amp;gt; is clearly between 0 and 1.  If our event is the &#039;&#039;certain event&#039;&#039; &amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt;, then for each time we perform the experiment, the event &amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt; is observed; &amp;lt;math&amp;gt;N_{\Omega} = N&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;P(\Omega)=1&amp;lt;/math&amp;gt;.  If our event is the &#039;&#039;impossible event&#039;&#039; &amp;lt;math&amp;gt;\varnothing&amp;lt;/math&amp;gt;, we know &amp;lt;math&amp;gt;N_{\varnothing}=0&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; P(\varnothing) = 0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; are &#039;&#039;disjoint events&#039;&#039;, then whenever event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; is observed, then it is impossible for event &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; to be observed simultaneously.  Then&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;N(A\cup B) = N(A) + N(B)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Given our definition of probability, we can arrive at the following:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A\cup B) = P(A) + P(B)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At this point it&#039;s worth remembering that all events are not disjoint events.  I was originally confused by events and outcomes, and this was the source of many misunderstandings.  For events that are not disjoint, we end up with the following probability definition.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; P(A\cup B) = P(A) + P(B) - P(A\cap B)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
How can we see this from example?  Well, let&#039;s consider drawing from a deck of cards.  I&#039;ll define two &#039;&#039;events&#039;&#039;: &amp;quot;drawing a Queen&amp;quot;, and &amp;quot;drawing a Spade&amp;quot;.  We can tell off the bat that these are not disjoint events, because you can draw a queen that is also a spade.  There are four queens in the deck, so if we perform the experiment of drawing a card, putting it back in the deck and shuffling (what statisticians refer to as &#039;&#039;sampling with replacement&#039;&#039;, we will end up with a probability of &amp;lt;math&amp;gt;\frac{1}{13}&amp;lt;/math&amp;gt; for a queen draw.  By the same argument, we obtain a probability for drawing a spade as &amp;lt;math&amp;gt;\frac{1}{4}&amp;lt;/math&amp;gt;.  The expression &amp;lt;math&amp;gt;P(A\cup B)&amp;lt;/math&amp;gt; here can be translated as &amp;quot;the chance of drawing a queen or a spade&amp;quot;.  If we assume naively (as I used to) that for this case &amp;lt;math&amp;gt;P(A\cup B) = P(A) + P(B)&amp;lt;/math&amp;gt;, we can simply add our probabilities together for &amp;quot;the chance of drawing a queen or a spade&amp;quot; as &amp;lt;math&amp;gt;\frac{1}{13}+\frac{1}{4}&amp;lt;/math&amp;gt;.  If we were to gather some data experimentally, we would find that our results would differ from the prediction -- the probability observed would be slightly less than &amp;lt;math&amp;gt;\frac{1}{13}+\frac{1}{4}&amp;lt;/math&amp;gt;.  Why?  Because we&#039;re counting the queen of spades twice in our expression, once as a spade, and again as a queen.  We need to count it only once, as it can only be drawn with probability of &amp;lt;math&amp;gt;\frac{1}{52}&amp;lt;/math&amp;gt;.  [[Still confused?]] &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Proof:&#039;&#039;&#039; If &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; are not disjoint, we have to avoid the double counting problem by exactly specifying their union.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;A \cup B = A \cup (B \backslash A) &amp;lt;/math&amp;gt; so &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A \cup B) = P(A \cup (B \backslash A)) &amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B \backslash A&amp;lt;/math&amp;gt; are disjoint sets.  We can then use the definition of disjoint events from above to express our desired result:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A \cup B) = P(A) + P(B \backslash A)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
We also know that&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(B \backslash A) = P(B) - P(B\cap A)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
so&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; P(A \cup B) = P(A) + P(B) - P(B\cap A)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Whew!  Our first proof.  I hope that wasn&#039;t too too [[dry]].&lt;br /&gt;
&lt;br /&gt;
== Conditional Probability ==&lt;br /&gt;
Many events are conditional on the occurance of other events.  Sometimes this coupling is weak.  One event may become more or less probable depending on our knowledge that another event has occured.  For instance, the probability that your friends and relatives will call asking for money is likely to be higher if you win the lottery.  In my case, I don&#039;t think this probability would change.&lt;br /&gt;
&lt;br /&gt;
Let&#039;s get formal for a second and remember our original definition of probability.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A) = \frac{N_{A}}{N}&amp;lt;/math&amp;gt;&lt;br /&gt;
Consider an additional event &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt;, and a situation where we are only interested in the probability of the occurance of &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; when &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; occurs.  A way at this probability is to perform a set of experiments (&#039;&#039;trials&#039;&#039;) and only record our results when the event &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; occurs.  In other words&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \frac{N_{A\cap B}}{N_{B}} &amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
We can divide through on top and bottom by &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; the total number of trials to get &amp;lt;math&amp;gt;P(A\cap B)/P(B)&amp;lt;/math&amp;gt;.  We define this as &#039;&#039;&#039;&#039;conditional probability&#039;&#039;&#039;&#039;:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A|B) = \frac{P(A\cap B)}{P(B)}&amp;lt;/math&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
which when spoken, takes the sound &amp;quot;probability of &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; given &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt;.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[[A Totally Confusing Problem that Shows how Difficult it is to Conquer Intuition]]&lt;br /&gt;
&lt;br /&gt;
=== Bayes&#039; Law ===&lt;br /&gt;
&lt;br /&gt;
An important theorem in statistics is &#039;&#039;&#039;Bayes&#039; Law&#039;&#039;&#039;, which states that &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; P(B|A) = \frac{P(A|B)P(A)}{P(B)}&amp;lt;/math&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
It is easy to prove.  We start with identical expressions for &amp;lt;math&amp;gt;P(A\cap B)&amp;lt;/math&amp;gt;.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; P(A\cap B) = P(B\cap A) &amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; P(A\cap B) = \frac{P(A|B)}{P(B)}&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; P(B\cap A) = \frac{P(B|A)}{P(A)}&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Simple rearrangement gives us the first expression above.&lt;br /&gt;
&lt;br /&gt;
== Independence ==&lt;br /&gt;
&lt;br /&gt;
Two events &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; are called &#039;&#039;independent&#039;&#039; if &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A\cap B) = P(A)P(B)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Random Variables ==&lt;br /&gt;
&lt;br /&gt;
It&#039;s usually possible to represent the outcome of experiments in terms of a representation involving integers or real numbers.  For instance, in the case of flipping a coin, it becomes a little cumbersome to record the outcomes of multiple experiments.  Let&#039;s say we flip a coin four times, and repeat this experiment twice.  We might have gotten the following outcomes from the two experiments.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\{HHTH\}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\{TTHH\}&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>69.118.80.7</name></author>
	</entry>
	<entry>
		<id>https://ideawaza.com/index.php?title=Introduction_to_Statistics&amp;diff=17049</id>
		<title>Introduction to Statistics</title>
		<link rel="alternate" type="text/html" href="https://ideawaza.com/index.php?title=Introduction_to_Statistics&amp;diff=17049"/>
		<updated>2005-06-29T20:12:52Z</updated>

		<summary type="html">&lt;p&gt;69.118.80.7: /* Random Variables */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Preamble ==&lt;br /&gt;
Probability and statistics is the most boring thing imaginable.  It&#039;s dull, unlike fancy math -- if you&#039;re ever at a cocktail party and want to impress someone, it&#039;s a lot easier to say you&#039;re a mathematician than to say you&#039;re a statistician.  It&#039;s also pretty abstract.  Most thorough explorations of the discipline are in very dry books that are short on examples.  If fact, if you&#039;re here it&#039;s probably because you&#039;re taking a stats class somewhere and your book and lecturer totally suck.  &lt;br /&gt;
&lt;br /&gt;
This aside, statistics is a central topic in modern life, and understanding just a little bit about it will help you a lot regardless of what you do or end up doing.  I hope this web site doesn&#039;t suck.  If it does, please leave comments on the discussion tab above.&lt;br /&gt;
&lt;br /&gt;
== Experiments, Outcomes and Events ==&lt;br /&gt;
&lt;br /&gt;
The easiest way to think of probability is in terms of experiments and their potential outcomes.  Many examples can be drawn from everyday experience:  On the drive home from work, you can encounter a flat tire, or have an uneventful drive; the outcome of an election can include either a win by candidate A, B, or C, or a runoff.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Definition:&#039;&#039;&#039; The entire collection of possible outcomes from an experiment is termed the &#039;&#039;sample space&#039;&#039;, indicated as &#039;&#039;&#039;&amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The simplest (albeit uninteresting) example would be an experiment with only one possible outcome, say &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  If we remember our set theory from elementary school, we can express the sample space as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega = \{ A \} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A more interesting example is the result of rolling a six sided dice.  The sample space for this experiment is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega = \{ 1,2,3,4,5,6 \}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We may be interested in &#039;&#039;events&#039;&#039; in an experiment.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Definition:&#039;&#039;&#039; An &#039;&#039;event&#039;&#039; is some subset of outcomes from the &#039;&#039;sample space&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In the dice example, events of interest might include&amp;lt;br&amp;gt;&lt;br /&gt;
a) the outcome is an even number&amp;lt;br&amp;gt;&lt;br /&gt;
b) the outcome is less than three&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These events can be expressed in terms of the possible outcomes from the experiment: &amp;lt;br&amp;gt;&lt;br /&gt;
a) : &amp;lt;math&amp;gt; \{2,4,6\} &amp;lt;/math&amp;gt; b) : &amp;lt;math&amp;gt; \{ 1,2 \}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can borrow definitions from set theory to express events in terms of outcomes.  Here is a refresher of some terminology, and some new terms that will be important later: &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \cup &amp;lt;/math&amp;gt; represents the Union of two events&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:[http://en.wikipedia.org/wiki/Image:Venn_A_union_B.png]]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \cap &amp;lt;/math&amp;gt; represents the Interection of two events&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:[http://en.wikipedia.org/wiki/Image:Venn_A_intersect_B.png]]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\{\cdots\}^{c}&amp;lt;/math&amp;gt; represents the complement of an event.  For instance, &amp;quot;the outcome is an even number&amp;quot; is the complement of &amp;quot;the outcome is an odd number&amp;quot; in the dice example.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; A \backslash B &amp;lt;/math&amp;gt; represents &#039;&#039;difference&#039;&#039;, that is, &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; &#039;&#039;but not&#039;&#039; &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt;.  For example, we may be interested in the event of drawing the queen of spades from a deck of cards.  This can be expressed as the event of drawing a queen, but not drawing a queen of hearts, diamonds or clubs.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\varnothing&amp;lt;/math&amp;gt; or &amp;lt;math&amp;gt;\{\}&amp;lt;/math&amp;gt; represent an &#039;&#039;impossible event&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt; represents a &#039;&#039;certain event&#039;&#039; &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; are called &#039;&#039;disjoint events&#039;&#039; if &amp;lt;math&amp;gt;A\cap B = \varnothing&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Probability ==&lt;br /&gt;
Now that we know what events are, we should think a bit about a way to express the likelihood of an event occuring.  The classical definition of probability comes from the following.  If we can perform our experiment over and over in a way that is repeatable, we can count the number of times that the experiment gives rise to event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  We also keep track of the number of times that we perform the same experiment.  If we repeat the experiment a large enough number of times, we can express the probability of event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; as follows:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A) = \frac{N_{A}}{N} &amp;lt;/math&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;N_{A}&amp;lt;/math&amp;gt; is the number of times event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; occurred, and &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; is the number of times the experiment was repeated.  As &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; approaches infinity, the fraction above approaches the true probability of the event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  The value of &amp;lt;math&amp;gt;P(A)&amp;lt;/math&amp;gt; is clearly between 0 and 1.  If our event is the &#039;&#039;certain event&#039;&#039; &amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt;, then for each time we perform the experiment, the event &amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt; is observed; &amp;lt;math&amp;gt;N_{\Omega} = N&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;P(\Omega)=1&amp;lt;/math&amp;gt;.  If our event is the &#039;&#039;impossible event&#039;&#039; &amp;lt;math&amp;gt;\varnothing&amp;lt;/math&amp;gt;, we know &amp;lt;math&amp;gt;N_{\varnothing}=0&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; P(\varnothing) = 0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; are &#039;&#039;disjoint events&#039;&#039;, then whenever event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; is observed, then it is impossible for event &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; to be observed simultaneously.  Then&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;N(A\cup B) = N(A) + N(B)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Given our definition of probability, we can arrive at the following:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A\cup B) = P(A) + P(B)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At this point it&#039;s worth remembering that all events are not disjoint events.  I was originally confused by events and outcomes, and this was the source of many misunderstandings.  For events that are not disjoint, we end up with the following probability definition.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; P(A\cup B) = P(A) + P(B) - P(A\cap B)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
How can we see this from example?  Well, let&#039;s consider drawing from a deck of cards.  I&#039;ll define two &#039;&#039;events&#039;&#039;: &amp;quot;drawing a Queen&amp;quot;, and &amp;quot;drawing a Spade&amp;quot;.  We can tell off the bat that these are not disjoint events, because you can draw a queen that is also a spade.  There are four queens in the deck, so if we perform the experiment of drawing a card, putting it back in the deck and shuffling (what statisticians refer to as &#039;&#039;sampling with replacement&#039;&#039;, we will end up with a probability of &amp;lt;math&amp;gt;\frac{1}{13}&amp;lt;/math&amp;gt; for a queen draw.  By the same argument, we obtain a probability for drawing a spade as &amp;lt;math&amp;gt;\frac{1}{4}&amp;lt;/math&amp;gt;.  The expression &amp;lt;math&amp;gt;P(A\cup B)&amp;lt;/math&amp;gt; here can be translated as &amp;quot;the chance of drawing a queen or a spade&amp;quot;.  If we assume naively (as I used to) that for this case &amp;lt;math&amp;gt;P(A\cup B) = P(A) + P(B)&amp;lt;/math&amp;gt;, we can simply add our probabilities together for &amp;quot;the chance of drawing a queen or a spade&amp;quot; as &amp;lt;math&amp;gt;\frac{1}{13}+\frac{1}{4}&amp;lt;/math&amp;gt;.  If we were to gather some data experimentally, we would find that our results would differ from the prediction -- the probability observed would be slightly less than &amp;lt;math&amp;gt;\frac{1}{13}+\frac{1}{4}&amp;lt;/math&amp;gt;.  Why?  Because we&#039;re counting the queen of spades twice in our expression, once as a spade, and again as a queen.  We need to count it only once, as it can only be drawn with probability of &amp;lt;math&amp;gt;\frac{1}{52}&amp;lt;/math&amp;gt;.  [[Still confused?]] &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Proof:&#039;&#039;&#039; If &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; are not disjoint, we have to avoid the double counting problem by exactly specifying their union.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;A \cup B = A \cup (B \backslash A) &amp;lt;/math&amp;gt; so &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A \cup B) = P(A \cup (B \backslash A)) &amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B \backslash A&amp;lt;/math&amp;gt; are disjoint sets.  We can then use the definition of disjoint events from above to express our desired result:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A \cup B) = P(A) + P(B \backslash A)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
We also know that&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(B \backslash A) = P(B) - P(B\cap A)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
so&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; P(A \cup B) = P(A) + P(B) - P(B\cap A)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Whew!  Our first proof.  I hope that wasn&#039;t too too [[dry]].&lt;br /&gt;
&lt;br /&gt;
== Conditional Probability ==&lt;br /&gt;
Many events are conditional on the occurance of other events.  Sometimes this coupling is weak.  One event may become more or less probable depending on our knowledge that another event has occured.  For instance, the probability that your friends and relatives will call asking for money is likely to be higher if you win the lottery.  In my case, I don&#039;t think this probability would change.&lt;br /&gt;
&lt;br /&gt;
Let&#039;s get formal for a second and remember our original definition of probability.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A) = \frac{N_{A}}{N}&amp;lt;/math&amp;gt;&lt;br /&gt;
Consider an additional event &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt;, and a situation where we are only interested in the probability of the occurance of &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; when &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; occurs.  A way at this probability is to perform a set of experiments (&#039;&#039;trials&#039;&#039;) and only record our results when the event &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; occurs.  In other words&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \frac{N_{A\cap B}}{N_{B}} &amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
We can divide through on top and bottom by &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; the total number of trials to get &amp;lt;math&amp;gt;P(A\cap B)/P(B)&amp;lt;/math&amp;gt;.  We define this as &#039;&#039;&#039;&#039;conditional probability&#039;&#039;&#039;&#039;:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A|B) = \frac{P(A\cap B)}{P(B)}&amp;lt;/math&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
which when spoken, takes the sound &amp;quot;probability of &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; given &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt;.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[[A Totally Confusing Problem that Shows how Difficult it is to Conquer Intuition]]&lt;br /&gt;
&lt;br /&gt;
=== Bayes&#039; Law ===&lt;br /&gt;
&lt;br /&gt;
An important theorem in statistics is &#039;&#039;&#039;Bayes&#039; Law&#039;&#039;&#039;, which states that &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; P(B|A) = \frac{P(A|B)P(A)}{P(B)}&amp;lt;/math&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
It is easy to prove.  We start with identical expressions for &amp;lt;math&amp;gt;P(A\cap B)&amp;lt;/math&amp;gt;.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; P(A\cap B) = P(B\cap A) &amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; P(A\cap B) = \frac{P(A|B)}{P(B)}&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; P(B\cap A) = \frac{P(B|A)}{P(A)}&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Simple rearrangement gives us the first expression above.&lt;br /&gt;
&lt;br /&gt;
== Independence ==&lt;br /&gt;
&lt;br /&gt;
Two events &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; are called &#039;&#039;independent&#039;&#039; if &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A\cap B) = P(A)P(B)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Random Variables ==&lt;br /&gt;
&lt;br /&gt;
It&#039;s usually possible to represent the outcome of experiments in terms of a representation involving integers or real numbers.  For instance, in the case of flipping a coin, it becomes a little cumbersome to record the outcomes of multiple experiments.  Let&#039;s say we flip a coin four times, and repeat this experiment twice.  We might have gotten the following outcomes from the two experiments.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;{HHTH}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;{TTHH}&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>69.118.80.7</name></author>
	</entry>
	<entry>
		<id>https://ideawaza.com/index.php?title=Introduction_to_Statistics&amp;diff=17048</id>
		<title>Introduction to Statistics</title>
		<link rel="alternate" type="text/html" href="https://ideawaza.com/index.php?title=Introduction_to_Statistics&amp;diff=17048"/>
		<updated>2005-06-29T20:02:09Z</updated>

		<summary type="html">&lt;p&gt;69.118.80.7: /* Conditional Probability */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Preamble ==&lt;br /&gt;
Probability and statistics is the most boring thing imaginable.  It&#039;s dull, unlike fancy math -- if you&#039;re ever at a cocktail party and want to impress someone, it&#039;s a lot easier to say you&#039;re a mathematician than to say you&#039;re a statistician.  It&#039;s also pretty abstract.  Most thorough explorations of the discipline are in very dry books that are short on examples.  If fact, if you&#039;re here it&#039;s probably because you&#039;re taking a stats class somewhere and your book and lecturer totally suck.  &lt;br /&gt;
&lt;br /&gt;
This aside, statistics is a central topic in modern life, and understanding just a little bit about it will help you a lot regardless of what you do or end up doing.  I hope this web site doesn&#039;t suck.  If it does, please leave comments on the discussion tab above.&lt;br /&gt;
&lt;br /&gt;
== Experiments, Outcomes and Events ==&lt;br /&gt;
&lt;br /&gt;
The easiest way to think of probability is in terms of experiments and their potential outcomes.  Many examples can be drawn from everyday experience:  On the drive home from work, you can encounter a flat tire, or have an uneventful drive; the outcome of an election can include either a win by candidate A, B, or C, or a runoff.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Definition:&#039;&#039;&#039; The entire collection of possible outcomes from an experiment is termed the &#039;&#039;sample space&#039;&#039;, indicated as &#039;&#039;&#039;&amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The simplest (albeit uninteresting) example would be an experiment with only one possible outcome, say &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  If we remember our set theory from elementary school, we can express the sample space as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega = \{ A \} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A more interesting example is the result of rolling a six sided dice.  The sample space for this experiment is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega = \{ 1,2,3,4,5,6 \}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We may be interested in &#039;&#039;events&#039;&#039; in an experiment.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Definition:&#039;&#039;&#039; An &#039;&#039;event&#039;&#039; is some subset of outcomes from the &#039;&#039;sample space&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In the dice example, events of interest might include&amp;lt;br&amp;gt;&lt;br /&gt;
a) the outcome is an even number&amp;lt;br&amp;gt;&lt;br /&gt;
b) the outcome is less than three&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These events can be expressed in terms of the possible outcomes from the experiment: &amp;lt;br&amp;gt;&lt;br /&gt;
a) : &amp;lt;math&amp;gt; \{2,4,6\} &amp;lt;/math&amp;gt; b) : &amp;lt;math&amp;gt; \{ 1,2 \}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can borrow definitions from set theory to express events in terms of outcomes.  Here is a refresher of some terminology, and some new terms that will be important later: &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \cup &amp;lt;/math&amp;gt; represents the Union of two events&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:[http://en.wikipedia.org/wiki/Image:Venn_A_union_B.png]]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \cap &amp;lt;/math&amp;gt; represents the Interection of two events&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:[http://en.wikipedia.org/wiki/Image:Venn_A_intersect_B.png]]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\{\cdots\}^{c}&amp;lt;/math&amp;gt; represents the complement of an event.  For instance, &amp;quot;the outcome is an even number&amp;quot; is the complement of &amp;quot;the outcome is an odd number&amp;quot; in the dice example.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; A \backslash B &amp;lt;/math&amp;gt; represents &#039;&#039;difference&#039;&#039;, that is, &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; &#039;&#039;but not&#039;&#039; &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt;.  For example, we may be interested in the event of drawing the queen of spades from a deck of cards.  This can be expressed as the event of drawing a queen, but not drawing a queen of hearts, diamonds or clubs.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\varnothing&amp;lt;/math&amp;gt; or &amp;lt;math&amp;gt;\{\}&amp;lt;/math&amp;gt; represent an &#039;&#039;impossible event&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt; represents a &#039;&#039;certain event&#039;&#039; &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; are called &#039;&#039;disjoint events&#039;&#039; if &amp;lt;math&amp;gt;A\cap B = \varnothing&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Probability ==&lt;br /&gt;
Now that we know what events are, we should think a bit about a way to express the likelihood of an event occuring.  The classical definition of probability comes from the following.  If we can perform our experiment over and over in a way that is repeatable, we can count the number of times that the experiment gives rise to event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  We also keep track of the number of times that we perform the same experiment.  If we repeat the experiment a large enough number of times, we can express the probability of event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; as follows:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A) = \frac{N_{A}}{N} &amp;lt;/math&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;N_{A}&amp;lt;/math&amp;gt; is the number of times event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; occurred, and &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; is the number of times the experiment was repeated.  As &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; approaches infinity, the fraction above approaches the true probability of the event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  The value of &amp;lt;math&amp;gt;P(A)&amp;lt;/math&amp;gt; is clearly between 0 and 1.  If our event is the &#039;&#039;certain event&#039;&#039; &amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt;, then for each time we perform the experiment, the event &amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt; is observed; &amp;lt;math&amp;gt;N_{\Omega} = N&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;P(\Omega)=1&amp;lt;/math&amp;gt;.  If our event is the &#039;&#039;impossible event&#039;&#039; &amp;lt;math&amp;gt;\varnothing&amp;lt;/math&amp;gt;, we know &amp;lt;math&amp;gt;N_{\varnothing}=0&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; P(\varnothing) = 0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; are &#039;&#039;disjoint events&#039;&#039;, then whenever event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; is observed, then it is impossible for event &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; to be observed simultaneously.  Then&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;N(A\cup B) = N(A) + N(B)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Given our definition of probability, we can arrive at the following:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A\cup B) = P(A) + P(B)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At this point it&#039;s worth remembering that all events are not disjoint events.  I was originally confused by events and outcomes, and this was the source of many misunderstandings.  For events that are not disjoint, we end up with the following probability definition.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; P(A\cup B) = P(A) + P(B) - P(A\cap B)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
How can we see this from example?  Well, let&#039;s consider drawing from a deck of cards.  I&#039;ll define two &#039;&#039;events&#039;&#039;: &amp;quot;drawing a Queen&amp;quot;, and &amp;quot;drawing a Spade&amp;quot;.  We can tell off the bat that these are not disjoint events, because you can draw a queen that is also a spade.  There are four queens in the deck, so if we perform the experiment of drawing a card, putting it back in the deck and shuffling (what statisticians refer to as &#039;&#039;sampling with replacement&#039;&#039;, we will end up with a probability of &amp;lt;math&amp;gt;\frac{1}{13}&amp;lt;/math&amp;gt; for a queen draw.  By the same argument, we obtain a probability for drawing a spade as &amp;lt;math&amp;gt;\frac{1}{4}&amp;lt;/math&amp;gt;.  The expression &amp;lt;math&amp;gt;P(A\cup B)&amp;lt;/math&amp;gt; here can be translated as &amp;quot;the chance of drawing a queen or a spade&amp;quot;.  If we assume naively (as I used to) that for this case &amp;lt;math&amp;gt;P(A\cup B) = P(A) + P(B)&amp;lt;/math&amp;gt;, we can simply add our probabilities together for &amp;quot;the chance of drawing a queen or a spade&amp;quot; as &amp;lt;math&amp;gt;\frac{1}{13}+\frac{1}{4}&amp;lt;/math&amp;gt;.  If we were to gather some data experimentally, we would find that our results would differ from the prediction -- the probability observed would be slightly less than &amp;lt;math&amp;gt;\frac{1}{13}+\frac{1}{4}&amp;lt;/math&amp;gt;.  Why?  Because we&#039;re counting the queen of spades twice in our expression, once as a spade, and again as a queen.  We need to count it only once, as it can only be drawn with probability of &amp;lt;math&amp;gt;\frac{1}{52}&amp;lt;/math&amp;gt;.  [[Still confused?]] &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Proof:&#039;&#039;&#039; If &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; are not disjoint, we have to avoid the double counting problem by exactly specifying their union.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;A \cup B = A \cup (B \backslash A) &amp;lt;/math&amp;gt; so &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A \cup B) = P(A \cup (B \backslash A)) &amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B \backslash A&amp;lt;/math&amp;gt; are disjoint sets.  We can then use the definition of disjoint events from above to express our desired result:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A \cup B) = P(A) + P(B \backslash A)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
We also know that&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(B \backslash A) = P(B) - P(B\cap A)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
so&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; P(A \cup B) = P(A) + P(B) - P(B\cap A)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Whew!  Our first proof.  I hope that wasn&#039;t too too [[dry]].&lt;br /&gt;
&lt;br /&gt;
== Conditional Probability ==&lt;br /&gt;
Many events are conditional on the occurance of other events.  Sometimes this coupling is weak.  One event may become more or less probable depending on our knowledge that another event has occured.  For instance, the probability that your friends and relatives will call asking for money is likely to be higher if you win the lottery.  In my case, I don&#039;t think this probability would change.&lt;br /&gt;
&lt;br /&gt;
Let&#039;s get formal for a second and remember our original definition of probability.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A) = \frac{N_{A}}{N}&amp;lt;/math&amp;gt;&lt;br /&gt;
Consider an additional event &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt;, and a situation where we are only interested in the probability of the occurance of &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; when &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; occurs.  A way at this probability is to perform a set of experiments (&#039;&#039;trials&#039;&#039;) and only record our results when the event &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; occurs.  In other words&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \frac{N_{A\cap B}}{N_{B}} &amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
We can divide through on top and bottom by &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; the total number of trials to get &amp;lt;math&amp;gt;P(A\cap B)/P(B)&amp;lt;/math&amp;gt;.  We define this as &#039;&#039;&#039;&#039;conditional probability&#039;&#039;&#039;&#039;:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A|B) = \frac{P(A\cap B)}{P(B)}&amp;lt;/math&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
which when spoken, takes the sound &amp;quot;probability of &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; given &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt;.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[[A Totally Confusing Problem that Shows how Difficult it is to Conquer Intuition]]&lt;br /&gt;
&lt;br /&gt;
=== Bayes&#039; Law ===&lt;br /&gt;
&lt;br /&gt;
An important theorem in statistics is &#039;&#039;&#039;Bayes&#039; Law&#039;&#039;&#039;, which states that &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; P(B|A) = \frac{P(A|B)P(A)}{P(B)}&amp;lt;/math&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
It is easy to prove.  We start with identical expressions for &amp;lt;math&amp;gt;P(A\cap B)&amp;lt;/math&amp;gt;.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; P(A\cap B) = P(B\cap A) &amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; P(A\cap B) = \frac{P(A|B)}{P(B)}&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; P(B\cap A) = \frac{P(B|A)}{P(A)}&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Simple rearrangement gives us the first expression above.&lt;br /&gt;
&lt;br /&gt;
== Independence ==&lt;br /&gt;
&lt;br /&gt;
Two events &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; are called &#039;&#039;independent&#039;&#039; if &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A\cap B) = P(A)P(B)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Random Variables ==&lt;/div&gt;</summary>
		<author><name>69.118.80.7</name></author>
	</entry>
	<entry>
		<id>https://ideawaza.com/index.php?title=Introduction_to_Statistics&amp;diff=17047</id>
		<title>Introduction to Statistics</title>
		<link rel="alternate" type="text/html" href="https://ideawaza.com/index.php?title=Introduction_to_Statistics&amp;diff=17047"/>
		<updated>2005-06-29T19:54:36Z</updated>

		<summary type="html">&lt;p&gt;69.118.80.7: /* Independence */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Preamble ==&lt;br /&gt;
Probability and statistics is the most boring thing imaginable.  It&#039;s dull, unlike fancy math -- if you&#039;re ever at a cocktail party and want to impress someone, it&#039;s a lot easier to say you&#039;re a mathematician than to say you&#039;re a statistician.  It&#039;s also pretty abstract.  Most thorough explorations of the discipline are in very dry books that are short on examples.  If fact, if you&#039;re here it&#039;s probably because you&#039;re taking a stats class somewhere and your book and lecturer totally suck.  &lt;br /&gt;
&lt;br /&gt;
This aside, statistics is a central topic in modern life, and understanding just a little bit about it will help you a lot regardless of what you do or end up doing.  I hope this web site doesn&#039;t suck.  If it does, please leave comments on the discussion tab above.&lt;br /&gt;
&lt;br /&gt;
== Experiments, Outcomes and Events ==&lt;br /&gt;
&lt;br /&gt;
The easiest way to think of probability is in terms of experiments and their potential outcomes.  Many examples can be drawn from everyday experience:  On the drive home from work, you can encounter a flat tire, or have an uneventful drive; the outcome of an election can include either a win by candidate A, B, or C, or a runoff.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Definition:&#039;&#039;&#039; The entire collection of possible outcomes from an experiment is termed the &#039;&#039;sample space&#039;&#039;, indicated as &#039;&#039;&#039;&amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The simplest (albeit uninteresting) example would be an experiment with only one possible outcome, say &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  If we remember our set theory from elementary school, we can express the sample space as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega = \{ A \} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A more interesting example is the result of rolling a six sided dice.  The sample space for this experiment is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega = \{ 1,2,3,4,5,6 \}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We may be interested in &#039;&#039;events&#039;&#039; in an experiment.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Definition:&#039;&#039;&#039; An &#039;&#039;event&#039;&#039; is some subset of outcomes from the &#039;&#039;sample space&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In the dice example, events of interest might include&amp;lt;br&amp;gt;&lt;br /&gt;
a) the outcome is an even number&amp;lt;br&amp;gt;&lt;br /&gt;
b) the outcome is less than three&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These events can be expressed in terms of the possible outcomes from the experiment: &amp;lt;br&amp;gt;&lt;br /&gt;
a) : &amp;lt;math&amp;gt; \{2,4,6\} &amp;lt;/math&amp;gt; b) : &amp;lt;math&amp;gt; \{ 1,2 \}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can borrow definitions from set theory to express events in terms of outcomes.  Here is a refresher of some terminology, and some new terms that will be important later: &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \cup &amp;lt;/math&amp;gt; represents the Union of two events&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:[http://en.wikipedia.org/wiki/Image:Venn_A_union_B.png]]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \cap &amp;lt;/math&amp;gt; represents the Interection of two events&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:[http://en.wikipedia.org/wiki/Image:Venn_A_intersect_B.png]]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\{\cdots\}^{c}&amp;lt;/math&amp;gt; represents the complement of an event.  For instance, &amp;quot;the outcome is an even number&amp;quot; is the complement of &amp;quot;the outcome is an odd number&amp;quot; in the dice example.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; A \backslash B &amp;lt;/math&amp;gt; represents &#039;&#039;difference&#039;&#039;, that is, &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; &#039;&#039;but not&#039;&#039; &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt;.  For example, we may be interested in the event of drawing the queen of spades from a deck of cards.  This can be expressed as the event of drawing a queen, but not drawing a queen of hearts, diamonds or clubs.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\varnothing&amp;lt;/math&amp;gt; or &amp;lt;math&amp;gt;\{\}&amp;lt;/math&amp;gt; represent an &#039;&#039;impossible event&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt; represents a &#039;&#039;certain event&#039;&#039; &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; are called &#039;&#039;disjoint events&#039;&#039; if &amp;lt;math&amp;gt;A\cap B = \varnothing&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Probability ==&lt;br /&gt;
Now that we know what events are, we should think a bit about a way to express the likelihood of an event occuring.  The classical definition of probability comes from the following.  If we can perform our experiment over and over in a way that is repeatable, we can count the number of times that the experiment gives rise to event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  We also keep track of the number of times that we perform the same experiment.  If we repeat the experiment a large enough number of times, we can express the probability of event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; as follows:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A) = \frac{N_{A}}{N} &amp;lt;/math&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;N_{A}&amp;lt;/math&amp;gt; is the number of times event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; occurred, and &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; is the number of times the experiment was repeated.  As &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; approaches infinity, the fraction above approaches the true probability of the event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  The value of &amp;lt;math&amp;gt;P(A)&amp;lt;/math&amp;gt; is clearly between 0 and 1.  If our event is the &#039;&#039;certain event&#039;&#039; &amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt;, then for each time we perform the experiment, the event &amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt; is observed; &amp;lt;math&amp;gt;N_{\Omega} = N&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;P(\Omega)=1&amp;lt;/math&amp;gt;.  If our event is the &#039;&#039;impossible event&#039;&#039; &amp;lt;math&amp;gt;\varnothing&amp;lt;/math&amp;gt;, we know &amp;lt;math&amp;gt;N_{\varnothing}=0&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; P(\varnothing) = 0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; are &#039;&#039;disjoint events&#039;&#039;, then whenever event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; is observed, then it is impossible for event &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; to be observed simultaneously.  Then&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;N(A\cup B) = N(A) + N(B)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Given our definition of probability, we can arrive at the following:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A\cup B) = P(A) + P(B)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At this point it&#039;s worth remembering that all events are not disjoint events.  I was originally confused by events and outcomes, and this was the source of many misunderstandings.  For events that are not disjoint, we end up with the following probability definition.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; P(A\cup B) = P(A) + P(B) - P(A\cap B)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
How can we see this from example?  Well, let&#039;s consider drawing from a deck of cards.  I&#039;ll define two &#039;&#039;events&#039;&#039;: &amp;quot;drawing a Queen&amp;quot;, and &amp;quot;drawing a Spade&amp;quot;.  We can tell off the bat that these are not disjoint events, because you can draw a queen that is also a spade.  There are four queens in the deck, so if we perform the experiment of drawing a card, putting it back in the deck and shuffling (what statisticians refer to as &#039;&#039;sampling with replacement&#039;&#039;, we will end up with a probability of &amp;lt;math&amp;gt;\frac{1}{13}&amp;lt;/math&amp;gt; for a queen draw.  By the same argument, we obtain a probability for drawing a spade as &amp;lt;math&amp;gt;\frac{1}{4}&amp;lt;/math&amp;gt;.  The expression &amp;lt;math&amp;gt;P(A\cup B)&amp;lt;/math&amp;gt; here can be translated as &amp;quot;the chance of drawing a queen or a spade&amp;quot;.  If we assume naively (as I used to) that for this case &amp;lt;math&amp;gt;P(A\cup B) = P(A) + P(B)&amp;lt;/math&amp;gt;, we can simply add our probabilities together for &amp;quot;the chance of drawing a queen or a spade&amp;quot; as &amp;lt;math&amp;gt;\frac{1}{13}+\frac{1}{4}&amp;lt;/math&amp;gt;.  If we were to gather some data experimentally, we would find that our results would differ from the prediction -- the probability observed would be slightly less than &amp;lt;math&amp;gt;\frac{1}{13}+\frac{1}{4}&amp;lt;/math&amp;gt;.  Why?  Because we&#039;re counting the queen of spades twice in our expression, once as a spade, and again as a queen.  We need to count it only once, as it can only be drawn with probability of &amp;lt;math&amp;gt;\frac{1}{52}&amp;lt;/math&amp;gt;.  [[Still confused?]] &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Proof:&#039;&#039;&#039; If &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; are not disjoint, we have to avoid the double counting problem by exactly specifying their union.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;A \cup B = A \cup (B \backslash A) &amp;lt;/math&amp;gt; so &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A \cup B) = P(A \cup (B \backslash A)) &amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B \backslash A&amp;lt;/math&amp;gt; are disjoint sets.  We can then use the definition of disjoint events from above to express our desired result:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A \cup B) = P(A) + P(B \backslash A)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
We also know that&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(B \backslash A) = P(B) - P(B\cap A)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
so&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; P(A \cup B) = P(A) + P(B) - P(B\cap A)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Whew!  Our first proof.  I hope that wasn&#039;t too too [[dry]].&lt;br /&gt;
&lt;br /&gt;
== Conditional Probability ==&lt;br /&gt;
Many events are conditional on the occurance of other events.  Sometimes this coupling is weak.  One event may become more or less probable depending on our knowledge that another event has occured.  For instance, the probability that your friends and relatives will call asking for money is likely to be higher if you win the lottery.  In my case, I don&#039;t think this probability would change.&lt;br /&gt;
&lt;br /&gt;
Let&#039;s get formal for a second and remember our original definition of probability.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A) = \frac{N_{A}}{N}&amp;lt;/math&amp;gt;&lt;br /&gt;
Consider an additional event &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt;, and a situation where we are only interested in the probability of the occurance of &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; when &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; occurs.  A way at this probability is to perform a set of experiments (&#039;&#039;trials&#039;&#039;) and only record our results when the event &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; occurs.  In other words&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \frac{N_{A\cap B}}{N_{B}} &amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
We can divide through on top and bottom by &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; the total number of trials to get &amp;lt;math&amp;gt;P(A\cap B)/P(B)&amp;lt;/math&amp;gt;.  We define this as &#039;&#039;&#039;&#039;conditional probability&#039;&#039;&#039;&#039;:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A|B) = \frac{P(A\cap B)}{P(B)}&amp;lt;/math&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
which when spoken, takes the sound &amp;quot;probability of &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; given &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt;.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[[A Totally Confusing Problem that Shows how Difficult it is to Conquer Intuition]]&lt;br /&gt;
&lt;br /&gt;
== Independence ==&lt;br /&gt;
&lt;br /&gt;
Two events &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; are called &#039;&#039;independent&#039;&#039; if &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A\cap B) = P(A)P(B)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Random Variables ==&lt;/div&gt;</summary>
		<author><name>69.118.80.7</name></author>
	</entry>
	<entry>
		<id>https://ideawaza.com/index.php?title=Introduction_to_Statistics&amp;diff=17046</id>
		<title>Introduction to Statistics</title>
		<link rel="alternate" type="text/html" href="https://ideawaza.com/index.php?title=Introduction_to_Statistics&amp;diff=17046"/>
		<updated>2005-06-29T19:52:23Z</updated>

		<summary type="html">&lt;p&gt;69.118.80.7: /* Independence */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Preamble ==&lt;br /&gt;
Probability and statistics is the most boring thing imaginable.  It&#039;s dull, unlike fancy math -- if you&#039;re ever at a cocktail party and want to impress someone, it&#039;s a lot easier to say you&#039;re a mathematician than to say you&#039;re a statistician.  It&#039;s also pretty abstract.  Most thorough explorations of the discipline are in very dry books that are short on examples.  If fact, if you&#039;re here it&#039;s probably because you&#039;re taking a stats class somewhere and your book and lecturer totally suck.  &lt;br /&gt;
&lt;br /&gt;
This aside, statistics is a central topic in modern life, and understanding just a little bit about it will help you a lot regardless of what you do or end up doing.  I hope this web site doesn&#039;t suck.  If it does, please leave comments on the discussion tab above.&lt;br /&gt;
&lt;br /&gt;
== Experiments, Outcomes and Events ==&lt;br /&gt;
&lt;br /&gt;
The easiest way to think of probability is in terms of experiments and their potential outcomes.  Many examples can be drawn from everyday experience:  On the drive home from work, you can encounter a flat tire, or have an uneventful drive; the outcome of an election can include either a win by candidate A, B, or C, or a runoff.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Definition:&#039;&#039;&#039; The entire collection of possible outcomes from an experiment is termed the &#039;&#039;sample space&#039;&#039;, indicated as &#039;&#039;&#039;&amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The simplest (albeit uninteresting) example would be an experiment with only one possible outcome, say &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  If we remember our set theory from elementary school, we can express the sample space as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega = \{ A \} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A more interesting example is the result of rolling a six sided dice.  The sample space for this experiment is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega = \{ 1,2,3,4,5,6 \}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We may be interested in &#039;&#039;events&#039;&#039; in an experiment.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Definition:&#039;&#039;&#039; An &#039;&#039;event&#039;&#039; is some subset of outcomes from the &#039;&#039;sample space&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In the dice example, events of interest might include&amp;lt;br&amp;gt;&lt;br /&gt;
a) the outcome is an even number&amp;lt;br&amp;gt;&lt;br /&gt;
b) the outcome is less than three&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These events can be expressed in terms of the possible outcomes from the experiment: &amp;lt;br&amp;gt;&lt;br /&gt;
a) : &amp;lt;math&amp;gt; \{2,4,6\} &amp;lt;/math&amp;gt; b) : &amp;lt;math&amp;gt; \{ 1,2 \}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can borrow definitions from set theory to express events in terms of outcomes.  Here is a refresher of some terminology, and some new terms that will be important later: &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \cup &amp;lt;/math&amp;gt; represents the Union of two events&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:[http://en.wikipedia.org/wiki/Image:Venn_A_union_B.png]]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \cap &amp;lt;/math&amp;gt; represents the Interection of two events&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:[http://en.wikipedia.org/wiki/Image:Venn_A_intersect_B.png]]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\{\cdots\}^{c}&amp;lt;/math&amp;gt; represents the complement of an event.  For instance, &amp;quot;the outcome is an even number&amp;quot; is the complement of &amp;quot;the outcome is an odd number&amp;quot; in the dice example.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; A \backslash B &amp;lt;/math&amp;gt; represents &#039;&#039;difference&#039;&#039;, that is, &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; &#039;&#039;but not&#039;&#039; &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt;.  For example, we may be interested in the event of drawing the queen of spades from a deck of cards.  This can be expressed as the event of drawing a queen, but not drawing a queen of hearts, diamonds or clubs.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\varnothing&amp;lt;/math&amp;gt; or &amp;lt;math&amp;gt;\{\}&amp;lt;/math&amp;gt; represent an &#039;&#039;impossible event&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt; represents a &#039;&#039;certain event&#039;&#039; &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; are called &#039;&#039;disjoint events&#039;&#039; if &amp;lt;math&amp;gt;A\cap B = \varnothing&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Probability ==&lt;br /&gt;
Now that we know what events are, we should think a bit about a way to express the likelihood of an event occuring.  The classical definition of probability comes from the following.  If we can perform our experiment over and over in a way that is repeatable, we can count the number of times that the experiment gives rise to event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  We also keep track of the number of times that we perform the same experiment.  If we repeat the experiment a large enough number of times, we can express the probability of event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; as follows:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A) = \frac{N_{A}}{N} &amp;lt;/math&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;N_{A}&amp;lt;/math&amp;gt; is the number of times event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; occurred, and &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; is the number of times the experiment was repeated.  As &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; approaches infinity, the fraction above approaches the true probability of the event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  The value of &amp;lt;math&amp;gt;P(A)&amp;lt;/math&amp;gt; is clearly between 0 and 1.  If our event is the &#039;&#039;certain event&#039;&#039; &amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt;, then for each time we perform the experiment, the event &amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt; is observed; &amp;lt;math&amp;gt;N_{\Omega} = N&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;P(\Omega)=1&amp;lt;/math&amp;gt;.  If our event is the &#039;&#039;impossible event&#039;&#039; &amp;lt;math&amp;gt;\varnothing&amp;lt;/math&amp;gt;, we know &amp;lt;math&amp;gt;N_{\varnothing}=0&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; P(\varnothing) = 0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; are &#039;&#039;disjoint events&#039;&#039;, then whenever event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; is observed, then it is impossible for event &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; to be observed simultaneously.  Then&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;N(A\cup B) = N(A) + N(B)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Given our definition of probability, we can arrive at the following:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A\cup B) = P(A) + P(B)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At this point it&#039;s worth remembering that all events are not disjoint events.  I was originally confused by events and outcomes, and this was the source of many misunderstandings.  For events that are not disjoint, we end up with the following probability definition.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; P(A\cup B) = P(A) + P(B) - P(A\cap B)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
How can we see this from example?  Well, let&#039;s consider drawing from a deck of cards.  I&#039;ll define two &#039;&#039;events&#039;&#039;: &amp;quot;drawing a Queen&amp;quot;, and &amp;quot;drawing a Spade&amp;quot;.  We can tell off the bat that these are not disjoint events, because you can draw a queen that is also a spade.  There are four queens in the deck, so if we perform the experiment of drawing a card, putting it back in the deck and shuffling (what statisticians refer to as &#039;&#039;sampling with replacement&#039;&#039;, we will end up with a probability of &amp;lt;math&amp;gt;\frac{1}{13}&amp;lt;/math&amp;gt; for a queen draw.  By the same argument, we obtain a probability for drawing a spade as &amp;lt;math&amp;gt;\frac{1}{4}&amp;lt;/math&amp;gt;.  The expression &amp;lt;math&amp;gt;P(A\cup B)&amp;lt;/math&amp;gt; here can be translated as &amp;quot;the chance of drawing a queen or a spade&amp;quot;.  If we assume naively (as I used to) that for this case &amp;lt;math&amp;gt;P(A\cup B) = P(A) + P(B)&amp;lt;/math&amp;gt;, we can simply add our probabilities together for &amp;quot;the chance of drawing a queen or a spade&amp;quot; as &amp;lt;math&amp;gt;\frac{1}{13}+\frac{1}{4}&amp;lt;/math&amp;gt;.  If we were to gather some data experimentally, we would find that our results would differ from the prediction -- the probability observed would be slightly less than &amp;lt;math&amp;gt;\frac{1}{13}+\frac{1}{4}&amp;lt;/math&amp;gt;.  Why?  Because we&#039;re counting the queen of spades twice in our expression, once as a spade, and again as a queen.  We need to count it only once, as it can only be drawn with probability of &amp;lt;math&amp;gt;\frac{1}{52}&amp;lt;/math&amp;gt;.  [[Still confused?]] &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Proof:&#039;&#039;&#039; If &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; are not disjoint, we have to avoid the double counting problem by exactly specifying their union.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;A \cup B = A \cup (B \backslash A) &amp;lt;/math&amp;gt; so &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A \cup B) = P(A \cup (B \backslash A)) &amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B \backslash A&amp;lt;/math&amp;gt; are disjoint sets.  We can then use the definition of disjoint events from above to express our desired result:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A \cup B) = P(A) + P(B \backslash A)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
We also know that&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(B \backslash A) = P(B) - P(B\cap A)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
so&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; P(A \cup B) = P(A) + P(B) - P(B\cap A)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Whew!  Our first proof.  I hope that wasn&#039;t too too [[dry]].&lt;br /&gt;
&lt;br /&gt;
== Conditional Probability ==&lt;br /&gt;
Many events are conditional on the occurance of other events.  Sometimes this coupling is weak.  One event may become more or less probable depending on our knowledge that another event has occured.  For instance, the probability that your friends and relatives will call asking for money is likely to be higher if you win the lottery.  In my case, I don&#039;t think this probability would change.&lt;br /&gt;
&lt;br /&gt;
Let&#039;s get formal for a second and remember our original definition of probability.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A) = \frac{N_{A}}{N}&amp;lt;/math&amp;gt;&lt;br /&gt;
Consider an additional event &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt;, and a situation where we are only interested in the probability of the occurance of &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; when &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; occurs.  A way at this probability is to perform a set of experiments (&#039;&#039;trials&#039;&#039;) and only record our results when the event &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; occurs.  In other words&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \frac{N_{A\cap B}}{N_{B}} &amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
We can divide through on top and bottom by &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; the total number of trials to get &amp;lt;math&amp;gt;P(A\cap B)/P(B)&amp;lt;/math&amp;gt;.  We define this as &#039;&#039;&#039;&#039;conditional probability&#039;&#039;&#039;&#039;:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A|B) = \frac{P(A\cap B)}{P(B)}&amp;lt;/math&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
which when spoken, takes the sound &amp;quot;probability of &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; given &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt;.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[[A Totally Confusing Problem that Shows how Difficult it is to Conquer Intuition]]&lt;br /&gt;
&lt;br /&gt;
== Independence ==&lt;br /&gt;
&lt;br /&gt;
Two events &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; are called &#039;&#039;independent&#039;&#039; if &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A\cap B) = P(A)P(B)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>69.118.80.7</name></author>
	</entry>
	<entry>
		<id>https://ideawaza.com/index.php?title=Introduction_to_Statistics&amp;diff=17045</id>
		<title>Introduction to Statistics</title>
		<link rel="alternate" type="text/html" href="https://ideawaza.com/index.php?title=Introduction_to_Statistics&amp;diff=17045"/>
		<updated>2005-06-29T16:39:12Z</updated>

		<summary type="html">&lt;p&gt;69.118.80.7: /* Conditional Probability */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Preamble ==&lt;br /&gt;
Probability and statistics is the most boring thing imaginable.  It&#039;s dull, unlike fancy math -- if you&#039;re ever at a cocktail party and want to impress someone, it&#039;s a lot easier to say you&#039;re a mathematician than to say you&#039;re a statistician.  It&#039;s also pretty abstract.  Most thorough explorations of the discipline are in very dry books that are short on examples.  If fact, if you&#039;re here it&#039;s probably because you&#039;re taking a stats class somewhere and your book and lecturer totally suck.  &lt;br /&gt;
&lt;br /&gt;
This aside, statistics is a central topic in modern life, and understanding just a little bit about it will help you a lot regardless of what you do or end up doing.  I hope this web site doesn&#039;t suck.  If it does, please leave comments on the discussion tab above.&lt;br /&gt;
&lt;br /&gt;
== Experiments, Outcomes and Events ==&lt;br /&gt;
&lt;br /&gt;
The easiest way to think of probability is in terms of experiments and their potential outcomes.  Many examples can be drawn from everyday experience:  On the drive home from work, you can encounter a flat tire, or have an uneventful drive; the outcome of an election can include either a win by candidate A, B, or C, or a runoff.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Definition:&#039;&#039;&#039; The entire collection of possible outcomes from an experiment is termed the &#039;&#039;sample space&#039;&#039;, indicated as &#039;&#039;&#039;&amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The simplest (albeit uninteresting) example would be an experiment with only one possible outcome, say &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  If we remember our set theory from elementary school, we can express the sample space as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega = \{ A \} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A more interesting example is the result of rolling a six sided dice.  The sample space for this experiment is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega = \{ 1,2,3,4,5,6 \}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We may be interested in &#039;&#039;events&#039;&#039; in an experiment.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Definition:&#039;&#039;&#039; An &#039;&#039;event&#039;&#039; is some subset of outcomes from the &#039;&#039;sample space&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In the dice example, events of interest might include&amp;lt;br&amp;gt;&lt;br /&gt;
a) the outcome is an even number&amp;lt;br&amp;gt;&lt;br /&gt;
b) the outcome is less than three&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These events can be expressed in terms of the possible outcomes from the experiment: &amp;lt;br&amp;gt;&lt;br /&gt;
a) : &amp;lt;math&amp;gt; \{2,4,6\} &amp;lt;/math&amp;gt; b) : &amp;lt;math&amp;gt; \{ 1,2 \}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can borrow definitions from set theory to express events in terms of outcomes.  Here is a refresher of some terminology, and some new terms that will be important later: &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \cup &amp;lt;/math&amp;gt; represents the Union of two events&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:[http://en.wikipedia.org/wiki/Image:Venn_A_union_B.png]]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \cap &amp;lt;/math&amp;gt; represents the Interection of two events&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:[http://en.wikipedia.org/wiki/Image:Venn_A_intersect_B.png]]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\{\cdots\}^{c}&amp;lt;/math&amp;gt; represents the complement of an event.  For instance, &amp;quot;the outcome is an even number&amp;quot; is the complement of &amp;quot;the outcome is an odd number&amp;quot; in the dice example.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; A \backslash B &amp;lt;/math&amp;gt; represents &#039;&#039;difference&#039;&#039;, that is, &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; &#039;&#039;but not&#039;&#039; &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt;.  For example, we may be interested in the event of drawing the queen of spades from a deck of cards.  This can be expressed as the event of drawing a queen, but not drawing a queen of hearts, diamonds or clubs.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\varnothing&amp;lt;/math&amp;gt; or &amp;lt;math&amp;gt;\{\}&amp;lt;/math&amp;gt; represent an &#039;&#039;impossible event&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt; represents a &#039;&#039;certain event&#039;&#039; &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; are called &#039;&#039;disjoint events&#039;&#039; if &amp;lt;math&amp;gt;A\cap B = \varnothing&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Probability ==&lt;br /&gt;
Now that we know what events are, we should think a bit about a way to express the likelihood of an event occuring.  The classical definition of probability comes from the following.  If we can perform our experiment over and over in a way that is repeatable, we can count the number of times that the experiment gives rise to event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  We also keep track of the number of times that we perform the same experiment.  If we repeat the experiment a large enough number of times, we can express the probability of event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; as follows:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A) = \frac{N_{A}}{N} &amp;lt;/math&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;N_{A}&amp;lt;/math&amp;gt; is the number of times event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; occurred, and &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; is the number of times the experiment was repeated.  As &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; approaches infinity, the fraction above approaches the true probability of the event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  The value of &amp;lt;math&amp;gt;P(A)&amp;lt;/math&amp;gt; is clearly between 0 and 1.  If our event is the &#039;&#039;certain event&#039;&#039; &amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt;, then for each time we perform the experiment, the event &amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt; is observed; &amp;lt;math&amp;gt;N_{\Omega} = N&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;P(\Omega)=1&amp;lt;/math&amp;gt;.  If our event is the &#039;&#039;impossible event&#039;&#039; &amp;lt;math&amp;gt;\varnothing&amp;lt;/math&amp;gt;, we know &amp;lt;math&amp;gt;N_{\varnothing}=0&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; P(\varnothing) = 0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; are &#039;&#039;disjoint events&#039;&#039;, then whenever event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; is observed, then it is impossible for event &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; to be observed simultaneously.  Then&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;N(A\cup B) = N(A) + N(B)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Given our definition of probability, we can arrive at the following:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A\cup B) = P(A) + P(B)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At this point it&#039;s worth remembering that all events are not disjoint events.  I was originally confused by events and outcomes, and this was the source of many misunderstandings.  For events that are not disjoint, we end up with the following probability definition.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; P(A\cup B) = P(A) + P(B) - P(A\cap B)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
How can we see this from example?  Well, let&#039;s consider drawing from a deck of cards.  I&#039;ll define two &#039;&#039;events&#039;&#039;: &amp;quot;drawing a Queen&amp;quot;, and &amp;quot;drawing a Spade&amp;quot;.  We can tell off the bat that these are not disjoint events, because you can draw a queen that is also a spade.  There are four queens in the deck, so if we perform the experiment of drawing a card, putting it back in the deck and shuffling (what statisticians refer to as &#039;&#039;sampling with replacement&#039;&#039;, we will end up with a probability of &amp;lt;math&amp;gt;\frac{1}{13}&amp;lt;/math&amp;gt; for a queen draw.  By the same argument, we obtain a probability for drawing a spade as &amp;lt;math&amp;gt;\frac{1}{4}&amp;lt;/math&amp;gt;.  The expression &amp;lt;math&amp;gt;P(A\cup B)&amp;lt;/math&amp;gt; here can be translated as &amp;quot;the chance of drawing a queen or a spade&amp;quot;.  If we assume naively (as I used to) that for this case &amp;lt;math&amp;gt;P(A\cup B) = P(A) + P(B)&amp;lt;/math&amp;gt;, we can simply add our probabilities together for &amp;quot;the chance of drawing a queen or a spade&amp;quot; as &amp;lt;math&amp;gt;\frac{1}{13}+\frac{1}{4}&amp;lt;/math&amp;gt;.  If we were to gather some data experimentally, we would find that our results would differ from the prediction -- the probability observed would be slightly less than &amp;lt;math&amp;gt;\frac{1}{13}+\frac{1}{4}&amp;lt;/math&amp;gt;.  Why?  Because we&#039;re counting the queen of spades twice in our expression, once as a spade, and again as a queen.  We need to count it only once, as it can only be drawn with probability of &amp;lt;math&amp;gt;\frac{1}{52}&amp;lt;/math&amp;gt;.  [[Still confused?]] &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Proof:&#039;&#039;&#039; If &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; are not disjoint, we have to avoid the double counting problem by exactly specifying their union.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;A \cup B = A \cup (B \backslash A) &amp;lt;/math&amp;gt; so &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A \cup B) = P(A \cup (B \backslash A)) &amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B \backslash A&amp;lt;/math&amp;gt; are disjoint sets.  We can then use the definition of disjoint events from above to express our desired result:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A \cup B) = P(A) + P(B \backslash A)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
We also know that&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(B \backslash A) = P(B) - P(B\cap A)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
so&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; P(A \cup B) = P(A) + P(B) - P(B\cap A)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Whew!  Our first proof.  I hope that wasn&#039;t too too [[dry]].&lt;br /&gt;
&lt;br /&gt;
== Conditional Probability ==&lt;br /&gt;
Many events are conditional on the occurance of other events.  Sometimes this coupling is weak.  One event may become more or less probable depending on our knowledge that another event has occured.  For instance, the probability that your friends and relatives will call asking for money is likely to be higher if you win the lottery.  In my case, I don&#039;t think this probability would change.&lt;br /&gt;
&lt;br /&gt;
Let&#039;s get formal for a second and remember our original definition of probability.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A) = \frac{N_{A}}{N}&amp;lt;/math&amp;gt;&lt;br /&gt;
Consider an additional event &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt;, and a situation where we are only interested in the probability of the occurance of &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; when &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; occurs.  A way at this probability is to perform a set of experiments (&#039;&#039;trials&#039;&#039;) and only record our results when the event &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; occurs.  In other words&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \frac{N_{A\cap B}}{N_{B}} &amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
We can divide through on top and bottom by &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; the total number of trials to get &amp;lt;math&amp;gt;P(A\cap B)/P(B)&amp;lt;/math&amp;gt;.  We define this as &#039;&#039;&#039;&#039;conditional probability&#039;&#039;&#039;&#039;:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A|B) = \frac{P(A\cap B)}{P(B)}&amp;lt;/math&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
which when spoken, takes the sound &amp;quot;probability of &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; given &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt;.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[[A Totally Confusing Problem that Shows how Difficult it is to Conquer Intuition]]&lt;br /&gt;
&lt;br /&gt;
== Independence ==&lt;/div&gt;</summary>
		<author><name>69.118.80.7</name></author>
	</entry>
	<entry>
		<id>https://ideawaza.com/index.php?title=Introduction_to_Statistics&amp;diff=17044</id>
		<title>Introduction to Statistics</title>
		<link rel="alternate" type="text/html" href="https://ideawaza.com/index.php?title=Introduction_to_Statistics&amp;diff=17044"/>
		<updated>2005-06-29T16:37:07Z</updated>

		<summary type="html">&lt;p&gt;69.118.80.7: /* Conditional Probability */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Preamble ==&lt;br /&gt;
Probability and statistics is the most boring thing imaginable.  It&#039;s dull, unlike fancy math -- if you&#039;re ever at a cocktail party and want to impress someone, it&#039;s a lot easier to say you&#039;re a mathematician than to say you&#039;re a statistician.  It&#039;s also pretty abstract.  Most thorough explorations of the discipline are in very dry books that are short on examples.  If fact, if you&#039;re here it&#039;s probably because you&#039;re taking a stats class somewhere and your book and lecturer totally suck.  &lt;br /&gt;
&lt;br /&gt;
This aside, statistics is a central topic in modern life, and understanding just a little bit about it will help you a lot regardless of what you do or end up doing.  I hope this web site doesn&#039;t suck.  If it does, please leave comments on the discussion tab above.&lt;br /&gt;
&lt;br /&gt;
== Experiments, Outcomes and Events ==&lt;br /&gt;
&lt;br /&gt;
The easiest way to think of probability is in terms of experiments and their potential outcomes.  Many examples can be drawn from everyday experience:  On the drive home from work, you can encounter a flat tire, or have an uneventful drive; the outcome of an election can include either a win by candidate A, B, or C, or a runoff.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Definition:&#039;&#039;&#039; The entire collection of possible outcomes from an experiment is termed the &#039;&#039;sample space&#039;&#039;, indicated as &#039;&#039;&#039;&amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The simplest (albeit uninteresting) example would be an experiment with only one possible outcome, say &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  If we remember our set theory from elementary school, we can express the sample space as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega = \{ A \} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A more interesting example is the result of rolling a six sided dice.  The sample space for this experiment is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega = \{ 1,2,3,4,5,6 \}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We may be interested in &#039;&#039;events&#039;&#039; in an experiment.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Definition:&#039;&#039;&#039; An &#039;&#039;event&#039;&#039; is some subset of outcomes from the &#039;&#039;sample space&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In the dice example, events of interest might include&amp;lt;br&amp;gt;&lt;br /&gt;
a) the outcome is an even number&amp;lt;br&amp;gt;&lt;br /&gt;
b) the outcome is less than three&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These events can be expressed in terms of the possible outcomes from the experiment: &amp;lt;br&amp;gt;&lt;br /&gt;
a) : &amp;lt;math&amp;gt; \{2,4,6\} &amp;lt;/math&amp;gt; b) : &amp;lt;math&amp;gt; \{ 1,2 \}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can borrow definitions from set theory to express events in terms of outcomes.  Here is a refresher of some terminology, and some new terms that will be important later: &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \cup &amp;lt;/math&amp;gt; represents the Union of two events&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:[http://en.wikipedia.org/wiki/Image:Venn_A_union_B.png]]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \cap &amp;lt;/math&amp;gt; represents the Interection of two events&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:[http://en.wikipedia.org/wiki/Image:Venn_A_intersect_B.png]]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\{\cdots\}^{c}&amp;lt;/math&amp;gt; represents the complement of an event.  For instance, &amp;quot;the outcome is an even number&amp;quot; is the complement of &amp;quot;the outcome is an odd number&amp;quot; in the dice example.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; A \backslash B &amp;lt;/math&amp;gt; represents &#039;&#039;difference&#039;&#039;, that is, &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; &#039;&#039;but not&#039;&#039; &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt;.  For example, we may be interested in the event of drawing the queen of spades from a deck of cards.  This can be expressed as the event of drawing a queen, but not drawing a queen of hearts, diamonds or clubs.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\varnothing&amp;lt;/math&amp;gt; or &amp;lt;math&amp;gt;\{\}&amp;lt;/math&amp;gt; represent an &#039;&#039;impossible event&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt; represents a &#039;&#039;certain event&#039;&#039; &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; are called &#039;&#039;disjoint events&#039;&#039; if &amp;lt;math&amp;gt;A\cap B = \varnothing&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Probability ==&lt;br /&gt;
Now that we know what events are, we should think a bit about a way to express the likelihood of an event occuring.  The classical definition of probability comes from the following.  If we can perform our experiment over and over in a way that is repeatable, we can count the number of times that the experiment gives rise to event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  We also keep track of the number of times that we perform the same experiment.  If we repeat the experiment a large enough number of times, we can express the probability of event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; as follows:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A) = \frac{N_{A}}{N} &amp;lt;/math&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;N_{A}&amp;lt;/math&amp;gt; is the number of times event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; occurred, and &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; is the number of times the experiment was repeated.  As &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; approaches infinity, the fraction above approaches the true probability of the event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  The value of &amp;lt;math&amp;gt;P(A)&amp;lt;/math&amp;gt; is clearly between 0 and 1.  If our event is the &#039;&#039;certain event&#039;&#039; &amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt;, then for each time we perform the experiment, the event &amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt; is observed; &amp;lt;math&amp;gt;N_{\Omega} = N&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;P(\Omega)=1&amp;lt;/math&amp;gt;.  If our event is the &#039;&#039;impossible event&#039;&#039; &amp;lt;math&amp;gt;\varnothing&amp;lt;/math&amp;gt;, we know &amp;lt;math&amp;gt;N_{\varnothing}=0&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; P(\varnothing) = 0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; are &#039;&#039;disjoint events&#039;&#039;, then whenever event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; is observed, then it is impossible for event &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; to be observed simultaneously.  Then&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;N(A\cup B) = N(A) + N(B)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Given our definition of probability, we can arrive at the following:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A\cup B) = P(A) + P(B)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At this point it&#039;s worth remembering that all events are not disjoint events.  I was originally confused by events and outcomes, and this was the source of many misunderstandings.  For events that are not disjoint, we end up with the following probability definition.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; P(A\cup B) = P(A) + P(B) - P(A\cap B)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
How can we see this from example?  Well, let&#039;s consider drawing from a deck of cards.  I&#039;ll define two &#039;&#039;events&#039;&#039;: &amp;quot;drawing a Queen&amp;quot;, and &amp;quot;drawing a Spade&amp;quot;.  We can tell off the bat that these are not disjoint events, because you can draw a queen that is also a spade.  There are four queens in the deck, so if we perform the experiment of drawing a card, putting it back in the deck and shuffling (what statisticians refer to as &#039;&#039;sampling with replacement&#039;&#039;, we will end up with a probability of &amp;lt;math&amp;gt;\frac{1}{13}&amp;lt;/math&amp;gt; for a queen draw.  By the same argument, we obtain a probability for drawing a spade as &amp;lt;math&amp;gt;\frac{1}{4}&amp;lt;/math&amp;gt;.  The expression &amp;lt;math&amp;gt;P(A\cup B)&amp;lt;/math&amp;gt; here can be translated as &amp;quot;the chance of drawing a queen or a spade&amp;quot;.  If we assume naively (as I used to) that for this case &amp;lt;math&amp;gt;P(A\cup B) = P(A) + P(B)&amp;lt;/math&amp;gt;, we can simply add our probabilities together for &amp;quot;the chance of drawing a queen or a spade&amp;quot; as &amp;lt;math&amp;gt;\frac{1}{13}+\frac{1}{4}&amp;lt;/math&amp;gt;.  If we were to gather some data experimentally, we would find that our results would differ from the prediction -- the probability observed would be slightly less than &amp;lt;math&amp;gt;\frac{1}{13}+\frac{1}{4}&amp;lt;/math&amp;gt;.  Why?  Because we&#039;re counting the queen of spades twice in our expression, once as a spade, and again as a queen.  We need to count it only once, as it can only be drawn with probability of &amp;lt;math&amp;gt;\frac{1}{52}&amp;lt;/math&amp;gt;.  [[Still confused?]] &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Proof:&#039;&#039;&#039; If &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; are not disjoint, we have to avoid the double counting problem by exactly specifying their union.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;A \cup B = A \cup (B \backslash A) &amp;lt;/math&amp;gt; so &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A \cup B) = P(A \cup (B \backslash A)) &amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B \backslash A&amp;lt;/math&amp;gt; are disjoint sets.  We can then use the definition of disjoint events from above to express our desired result:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A \cup B) = P(A) + P(B \backslash A)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
We also know that&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(B \backslash A) = P(B) - P(B\cap A)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
so&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; P(A \cup B) = P(A) + P(B) - P(B\cap A)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Whew!  Our first proof.  I hope that wasn&#039;t too too [[dry]].&lt;br /&gt;
&lt;br /&gt;
== Conditional Probability ==&lt;br /&gt;
Many events are conditional on the occurance of other events.  Sometimes this coupling is weak.  One event may become more or less probable depending on our knowledge that another event has occured.  For instance, the probability that your friends and relatives will call asking for money is likely to be higher if you win the lottery.  In my case, I don&#039;t think this probability would change.&lt;br /&gt;
&lt;br /&gt;
Let&#039;s get formal for a second and remember our original definition of probability.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A) = \frac{N_{A}}{N}&amp;lt;/math&amp;gt;&lt;br /&gt;
Consider an additional event &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt;, and a situation where we are only interested in the probability of the occurance of &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; when &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; occurs.  A way at this probability is to perform a set of experiments (&#039;&#039;trials&#039;&#039;) and only record our results when the event &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; occurs.  In other words&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \frac{N_{A\cap B}}{N_{B}} &amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
We can divide through on top and bottom by &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; the total number of trials to get &amp;lt;math&amp;gt;P(A\cap B)/P(B)&amp;lt;/math&amp;gt;.  We define this as &#039;&#039;&#039;&#039;conditional probability&#039;&#039;&#039;&#039;:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A|B) = \frac{P(A\cap B)}{P(B)}&amp;lt;/math&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
which when spoken, takes the sound &amp;quot;probability of &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; given &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt;.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Independence ==&lt;/div&gt;</summary>
		<author><name>69.118.80.7</name></author>
	</entry>
	<entry>
		<id>https://ideawaza.com/index.php?title=Introduction_to_Statistics&amp;diff=17043</id>
		<title>Introduction to Statistics</title>
		<link rel="alternate" type="text/html" href="https://ideawaza.com/index.php?title=Introduction_to_Statistics&amp;diff=17043"/>
		<updated>2005-06-29T16:34:12Z</updated>

		<summary type="html">&lt;p&gt;69.118.80.7: /* Conditional Probability */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Preamble ==&lt;br /&gt;
Probability and statistics is the most boring thing imaginable.  It&#039;s dull, unlike fancy math -- if you&#039;re ever at a cocktail party and want to impress someone, it&#039;s a lot easier to say you&#039;re a mathematician than to say you&#039;re a statistician.  It&#039;s also pretty abstract.  Most thorough explorations of the discipline are in very dry books that are short on examples.  If fact, if you&#039;re here it&#039;s probably because you&#039;re taking a stats class somewhere and your book and lecturer totally suck.  &lt;br /&gt;
&lt;br /&gt;
This aside, statistics is a central topic in modern life, and understanding just a little bit about it will help you a lot regardless of what you do or end up doing.  I hope this web site doesn&#039;t suck.  If it does, please leave comments on the discussion tab above.&lt;br /&gt;
&lt;br /&gt;
== Experiments, Outcomes and Events ==&lt;br /&gt;
&lt;br /&gt;
The easiest way to think of probability is in terms of experiments and their potential outcomes.  Many examples can be drawn from everyday experience:  On the drive home from work, you can encounter a flat tire, or have an uneventful drive; the outcome of an election can include either a win by candidate A, B, or C, or a runoff.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Definition:&#039;&#039;&#039; The entire collection of possible outcomes from an experiment is termed the &#039;&#039;sample space&#039;&#039;, indicated as &#039;&#039;&#039;&amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The simplest (albeit uninteresting) example would be an experiment with only one possible outcome, say &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  If we remember our set theory from elementary school, we can express the sample space as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega = \{ A \} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A more interesting example is the result of rolling a six sided dice.  The sample space for this experiment is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega = \{ 1,2,3,4,5,6 \}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We may be interested in &#039;&#039;events&#039;&#039; in an experiment.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Definition:&#039;&#039;&#039; An &#039;&#039;event&#039;&#039; is some subset of outcomes from the &#039;&#039;sample space&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In the dice example, events of interest might include&amp;lt;br&amp;gt;&lt;br /&gt;
a) the outcome is an even number&amp;lt;br&amp;gt;&lt;br /&gt;
b) the outcome is less than three&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These events can be expressed in terms of the possible outcomes from the experiment: &amp;lt;br&amp;gt;&lt;br /&gt;
a) : &amp;lt;math&amp;gt; \{2,4,6\} &amp;lt;/math&amp;gt; b) : &amp;lt;math&amp;gt; \{ 1,2 \}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can borrow definitions from set theory to express events in terms of outcomes.  Here is a refresher of some terminology, and some new terms that will be important later: &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \cup &amp;lt;/math&amp;gt; represents the Union of two events&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:[http://en.wikipedia.org/wiki/Image:Venn_A_union_B.png]]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \cap &amp;lt;/math&amp;gt; represents the Interection of two events&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:[http://en.wikipedia.org/wiki/Image:Venn_A_intersect_B.png]]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\{\cdots\}^{c}&amp;lt;/math&amp;gt; represents the complement of an event.  For instance, &amp;quot;the outcome is an even number&amp;quot; is the complement of &amp;quot;the outcome is an odd number&amp;quot; in the dice example.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; A \backslash B &amp;lt;/math&amp;gt; represents &#039;&#039;difference&#039;&#039;, that is, &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; &#039;&#039;but not&#039;&#039; &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt;.  For example, we may be interested in the event of drawing the queen of spades from a deck of cards.  This can be expressed as the event of drawing a queen, but not drawing a queen of hearts, diamonds or clubs.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\varnothing&amp;lt;/math&amp;gt; or &amp;lt;math&amp;gt;\{\}&amp;lt;/math&amp;gt; represent an &#039;&#039;impossible event&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt; represents a &#039;&#039;certain event&#039;&#039; &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; are called &#039;&#039;disjoint events&#039;&#039; if &amp;lt;math&amp;gt;A\cap B = \varnothing&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Probability ==&lt;br /&gt;
Now that we know what events are, we should think a bit about a way to express the likelihood of an event occuring.  The classical definition of probability comes from the following.  If we can perform our experiment over and over in a way that is repeatable, we can count the number of times that the experiment gives rise to event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  We also keep track of the number of times that we perform the same experiment.  If we repeat the experiment a large enough number of times, we can express the probability of event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; as follows:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A) = \frac{N_{A}}{N} &amp;lt;/math&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;N_{A}&amp;lt;/math&amp;gt; is the number of times event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; occurred, and &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; is the number of times the experiment was repeated.  As &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; approaches infinity, the fraction above approaches the true probability of the event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  The value of &amp;lt;math&amp;gt;P(A)&amp;lt;/math&amp;gt; is clearly between 0 and 1.  If our event is the &#039;&#039;certain event&#039;&#039; &amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt;, then for each time we perform the experiment, the event &amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt; is observed; &amp;lt;math&amp;gt;N_{\Omega} = N&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;P(\Omega)=1&amp;lt;/math&amp;gt;.  If our event is the &#039;&#039;impossible event&#039;&#039; &amp;lt;math&amp;gt;\varnothing&amp;lt;/math&amp;gt;, we know &amp;lt;math&amp;gt;N_{\varnothing}=0&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; P(\varnothing) = 0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; are &#039;&#039;disjoint events&#039;&#039;, then whenever event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; is observed, then it is impossible for event &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; to be observed simultaneously.  Then&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;N(A\cup B) = N(A) + N(B)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Given our definition of probability, we can arrive at the following:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A\cup B) = P(A) + P(B)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At this point it&#039;s worth remembering that all events are not disjoint events.  I was originally confused by events and outcomes, and this was the source of many misunderstandings.  For events that are not disjoint, we end up with the following probability definition.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; P(A\cup B) = P(A) + P(B) - P(A\cap B)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
How can we see this from example?  Well, let&#039;s consider drawing from a deck of cards.  I&#039;ll define two &#039;&#039;events&#039;&#039;: &amp;quot;drawing a Queen&amp;quot;, and &amp;quot;drawing a Spade&amp;quot;.  We can tell off the bat that these are not disjoint events, because you can draw a queen that is also a spade.  There are four queens in the deck, so if we perform the experiment of drawing a card, putting it back in the deck and shuffling (what statisticians refer to as &#039;&#039;sampling with replacement&#039;&#039;, we will end up with a probability of &amp;lt;math&amp;gt;\frac{1}{13}&amp;lt;/math&amp;gt; for a queen draw.  By the same argument, we obtain a probability for drawing a spade as &amp;lt;math&amp;gt;\frac{1}{4}&amp;lt;/math&amp;gt;.  The expression &amp;lt;math&amp;gt;P(A\cup B)&amp;lt;/math&amp;gt; here can be translated as &amp;quot;the chance of drawing a queen or a spade&amp;quot;.  If we assume naively (as I used to) that for this case &amp;lt;math&amp;gt;P(A\cup B) = P(A) + P(B)&amp;lt;/math&amp;gt;, we can simply add our probabilities together for &amp;quot;the chance of drawing a queen or a spade&amp;quot; as &amp;lt;math&amp;gt;\frac{1}{13}+\frac{1}{4}&amp;lt;/math&amp;gt;.  If we were to gather some data experimentally, we would find that our results would differ from the prediction -- the probability observed would be slightly less than &amp;lt;math&amp;gt;\frac{1}{13}+\frac{1}{4}&amp;lt;/math&amp;gt;.  Why?  Because we&#039;re counting the queen of spades twice in our expression, once as a spade, and again as a queen.  We need to count it only once, as it can only be drawn with probability of &amp;lt;math&amp;gt;\frac{1}{52}&amp;lt;/math&amp;gt;.  [[Still confused?]] &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Proof:&#039;&#039;&#039; If &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; are not disjoint, we have to avoid the double counting problem by exactly specifying their union.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;A \cup B = A \cup (B \backslash A) &amp;lt;/math&amp;gt; so &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A \cup B) = P(A \cup (B \backslash A)) &amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B \backslash A&amp;lt;/math&amp;gt; are disjoint sets.  We can then use the definition of disjoint events from above to express our desired result:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A \cup B) = P(A) + P(B \backslash A)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
We also know that&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(B \backslash A) = P(B) - P(B\cap A)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
so&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; P(A \cup B) = P(A) + P(B) - P(B\cap A)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Whew!  Our first proof.  I hope that wasn&#039;t too too [[dry]].&lt;br /&gt;
&lt;br /&gt;
== Conditional Probability ==&lt;br /&gt;
Many events are conditional on the occurance of other events.  Sometimes this coupling is weak.  One event may become more or less probable depending on our knowledge that another event has occured.  For instance, the probability that your friends and relatives will call asking for money is likely to be higher if you win the lottery.  In my case, I don&#039;t think this probability would change.&lt;br /&gt;
&lt;br /&gt;
Let&#039;s get formal for a second and remember our original definition of probability.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A) = \frac{N_{A}}{N}&amp;lt;/math&amp;gt;&lt;br /&gt;
Consider an additional event &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt;, and a situation where we are only interested in the probability of the occurance of &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; when &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; occurs.  A way at this probability is to perform a set of experiments (&#039;&#039;trials&#039;&#039;) and only record our results when the event &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; occurs.  In other words&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \frac{N_{A\cap B}}{N_{B}} &amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
We can divide through on top and bottom by &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; the total number of trials to get &amp;lt;math&amp;gt;P(A\cap B)/P(B)&amp;lt;/math&amp;gt;.  We define this as &#039;&#039;&#039;&#039;conditional probability&#039;&#039;&#039;&#039;:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A|B) = \frac{P(A\cap B)}{P(B)}&amp;lt;/math&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
which when spoken, takes the sound &amp;quot;probability of &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; given &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt;.&amp;quot;&lt;/div&gt;</summary>
		<author><name>69.118.80.7</name></author>
	</entry>
	<entry>
		<id>https://ideawaza.com/index.php?title=Introduction_to_Statistics&amp;diff=17042</id>
		<title>Introduction to Statistics</title>
		<link rel="alternate" type="text/html" href="https://ideawaza.com/index.php?title=Introduction_to_Statistics&amp;diff=17042"/>
		<updated>2005-06-29T16:23:52Z</updated>

		<summary type="html">&lt;p&gt;69.118.80.7: /* Conditional Probability */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Preamble ==&lt;br /&gt;
Probability and statistics is the most boring thing imaginable.  It&#039;s dull, unlike fancy math -- if you&#039;re ever at a cocktail party and want to impress someone, it&#039;s a lot easier to say you&#039;re a mathematician than to say you&#039;re a statistician.  It&#039;s also pretty abstract.  Most thorough explorations of the discipline are in very dry books that are short on examples.  If fact, if you&#039;re here it&#039;s probably because you&#039;re taking a stats class somewhere and your book and lecturer totally suck.  &lt;br /&gt;
&lt;br /&gt;
This aside, statistics is a central topic in modern life, and understanding just a little bit about it will help you a lot regardless of what you do or end up doing.  I hope this web site doesn&#039;t suck.  If it does, please leave comments on the discussion tab above.&lt;br /&gt;
&lt;br /&gt;
== Experiments, Outcomes and Events ==&lt;br /&gt;
&lt;br /&gt;
The easiest way to think of probability is in terms of experiments and their potential outcomes.  Many examples can be drawn from everyday experience:  On the drive home from work, you can encounter a flat tire, or have an uneventful drive; the outcome of an election can include either a win by candidate A, B, or C, or a runoff.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Definition:&#039;&#039;&#039; The entire collection of possible outcomes from an experiment is termed the &#039;&#039;sample space&#039;&#039;, indicated as &#039;&#039;&#039;&amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The simplest (albeit uninteresting) example would be an experiment with only one possible outcome, say &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  If we remember our set theory from elementary school, we can express the sample space as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega = \{ A \} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A more interesting example is the result of rolling a six sided dice.  The sample space for this experiment is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega = \{ 1,2,3,4,5,6 \}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We may be interested in &#039;&#039;events&#039;&#039; in an experiment.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Definition:&#039;&#039;&#039; An &#039;&#039;event&#039;&#039; is some subset of outcomes from the &#039;&#039;sample space&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In the dice example, events of interest might include&amp;lt;br&amp;gt;&lt;br /&gt;
a) the outcome is an even number&amp;lt;br&amp;gt;&lt;br /&gt;
b) the outcome is less than three&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These events can be expressed in terms of the possible outcomes from the experiment: &amp;lt;br&amp;gt;&lt;br /&gt;
a) : &amp;lt;math&amp;gt; \{2,4,6\} &amp;lt;/math&amp;gt; b) : &amp;lt;math&amp;gt; \{ 1,2 \}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can borrow definitions from set theory to express events in terms of outcomes.  Here is a refresher of some terminology, and some new terms that will be important later: &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \cup &amp;lt;/math&amp;gt; represents the Union of two events&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:[http://en.wikipedia.org/wiki/Image:Venn_A_union_B.png]]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \cap &amp;lt;/math&amp;gt; represents the Interection of two events&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:[http://en.wikipedia.org/wiki/Image:Venn_A_intersect_B.png]]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\{\cdots\}^{c}&amp;lt;/math&amp;gt; represents the complement of an event.  For instance, &amp;quot;the outcome is an even number&amp;quot; is the complement of &amp;quot;the outcome is an odd number&amp;quot; in the dice example.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; A \backslash B &amp;lt;/math&amp;gt; represents &#039;&#039;difference&#039;&#039;, that is, &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; &#039;&#039;but not&#039;&#039; &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt;.  For example, we may be interested in the event of drawing the queen of spades from a deck of cards.  This can be expressed as the event of drawing a queen, but not drawing a queen of hearts, diamonds or clubs.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\varnothing&amp;lt;/math&amp;gt; or &amp;lt;math&amp;gt;\{\}&amp;lt;/math&amp;gt; represent an &#039;&#039;impossible event&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt; represents a &#039;&#039;certain event&#039;&#039; &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; are called &#039;&#039;disjoint events&#039;&#039; if &amp;lt;math&amp;gt;A\cap B = \varnothing&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Probability ==&lt;br /&gt;
Now that we know what events are, we should think a bit about a way to express the likelihood of an event occuring.  The classical definition of probability comes from the following.  If we can perform our experiment over and over in a way that is repeatable, we can count the number of times that the experiment gives rise to event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  We also keep track of the number of times that we perform the same experiment.  If we repeat the experiment a large enough number of times, we can express the probability of event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; as follows:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A) = \frac{N_{A}}{N} &amp;lt;/math&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;N_{A}&amp;lt;/math&amp;gt; is the number of times event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; occurred, and &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; is the number of times the experiment was repeated.  As &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; approaches infinity, the fraction above approaches the true probability of the event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  The value of &amp;lt;math&amp;gt;P(A)&amp;lt;/math&amp;gt; is clearly between 0 and 1.  If our event is the &#039;&#039;certain event&#039;&#039; &amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt;, then for each time we perform the experiment, the event &amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt; is observed; &amp;lt;math&amp;gt;N_{\Omega} = N&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;P(\Omega)=1&amp;lt;/math&amp;gt;.  If our event is the &#039;&#039;impossible event&#039;&#039; &amp;lt;math&amp;gt;\varnothing&amp;lt;/math&amp;gt;, we know &amp;lt;math&amp;gt;N_{\varnothing}=0&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; P(\varnothing) = 0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; are &#039;&#039;disjoint events&#039;&#039;, then whenever event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; is observed, then it is impossible for event &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; to be observed simultaneously.  Then&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;N(A\cup B) = N(A) + N(B)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Given our definition of probability, we can arrive at the following:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A\cup B) = P(A) + P(B)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At this point it&#039;s worth remembering that all events are not disjoint events.  I was originally confused by events and outcomes, and this was the source of many misunderstandings.  For events that are not disjoint, we end up with the following probability definition.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; P(A\cup B) = P(A) + P(B) - P(A\cap B)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
How can we see this from example?  Well, let&#039;s consider drawing from a deck of cards.  I&#039;ll define two &#039;&#039;events&#039;&#039;: &amp;quot;drawing a Queen&amp;quot;, and &amp;quot;drawing a Spade&amp;quot;.  We can tell off the bat that these are not disjoint events, because you can draw a queen that is also a spade.  There are four queens in the deck, so if we perform the experiment of drawing a card, putting it back in the deck and shuffling (what statisticians refer to as &#039;&#039;sampling with replacement&#039;&#039;, we will end up with a probability of &amp;lt;math&amp;gt;\frac{1}{13}&amp;lt;/math&amp;gt; for a queen draw.  By the same argument, we obtain a probability for drawing a spade as &amp;lt;math&amp;gt;\frac{1}{4}&amp;lt;/math&amp;gt;.  The expression &amp;lt;math&amp;gt;P(A\cup B)&amp;lt;/math&amp;gt; here can be translated as &amp;quot;the chance of drawing a queen or a spade&amp;quot;.  If we assume naively (as I used to) that for this case &amp;lt;math&amp;gt;P(A\cup B) = P(A) + P(B)&amp;lt;/math&amp;gt;, we can simply add our probabilities together for &amp;quot;the chance of drawing a queen or a spade&amp;quot; as &amp;lt;math&amp;gt;\frac{1}{13}+\frac{1}{4}&amp;lt;/math&amp;gt;.  If we were to gather some data experimentally, we would find that our results would differ from the prediction -- the probability observed would be slightly less than &amp;lt;math&amp;gt;\frac{1}{13}+\frac{1}{4}&amp;lt;/math&amp;gt;.  Why?  Because we&#039;re counting the queen of spades twice in our expression, once as a spade, and again as a queen.  We need to count it only once, as it can only be drawn with probability of &amp;lt;math&amp;gt;\frac{1}{52}&amp;lt;/math&amp;gt;.  [[Still confused?]] &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Proof:&#039;&#039;&#039; If &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; are not disjoint, we have to avoid the double counting problem by exactly specifying their union.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;A \cup B = A \cup (B \backslash A) &amp;lt;/math&amp;gt; so &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A \cup B) = P(A \cup (B \backslash A)) &amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B \backslash A&amp;lt;/math&amp;gt; are disjoint sets.  We can then use the definition of disjoint events from above to express our desired result:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A \cup B) = P(A) + P(B \backslash A)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
We also know that&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(B \backslash A) = P(B) - P(B\cap A)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
so&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; P(A \cup B) = P(A) + P(B) - P(B\cap A)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Whew!  Our first proof.  I hope that wasn&#039;t too too [[dry]].&lt;br /&gt;
&lt;br /&gt;
== Conditional Probability ==&lt;br /&gt;
Many events are conditional on the occurance of other events.  Sometimes this coupling is weak.  One event may become more or less probable depending on our knowledge that another event has occured.  For instance, the probability that your friends and relatives will call asking for money is likely to be higher if you win the lottery.  In my case, I don&#039;t think this probability would change.&lt;br /&gt;
&lt;br /&gt;
Let&#039;s get formal for a second and remember our original definition of probability.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A) = \frac{N_{A}}{N}&amp;lt;/math&amp;gt;&lt;br /&gt;
Consider an additional event &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt;, and a situation where we are only interested in the probability of the occurance of &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; when &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; occurs.  A way at this probability is to perform a set of experiments (&#039;&#039;trials&#039;&#039;) and only record our results when the event &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; occurs.  In other words&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \frac{N_{A\cap B}}{N_{A}} &amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>69.118.80.7</name></author>
	</entry>
	<entry>
		<id>https://ideawaza.com/index.php?title=Introduction_to_Statistics&amp;diff=17041</id>
		<title>Introduction to Statistics</title>
		<link rel="alternate" type="text/html" href="https://ideawaza.com/index.php?title=Introduction_to_Statistics&amp;diff=17041"/>
		<updated>2005-06-29T16:18:55Z</updated>

		<summary type="html">&lt;p&gt;69.118.80.7: /* Conditional Probability */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Preamble ==&lt;br /&gt;
Probability and statistics is the most boring thing imaginable.  It&#039;s dull, unlike fancy math -- if you&#039;re ever at a cocktail party and want to impress someone, it&#039;s a lot easier to say you&#039;re a mathematician than to say you&#039;re a statistician.  It&#039;s also pretty abstract.  Most thorough explorations of the discipline are in very dry books that are short on examples.  If fact, if you&#039;re here it&#039;s probably because you&#039;re taking a stats class somewhere and your book and lecturer totally suck.  &lt;br /&gt;
&lt;br /&gt;
This aside, statistics is a central topic in modern life, and understanding just a little bit about it will help you a lot regardless of what you do or end up doing.  I hope this web site doesn&#039;t suck.  If it does, please leave comments on the discussion tab above.&lt;br /&gt;
&lt;br /&gt;
== Experiments, Outcomes and Events ==&lt;br /&gt;
&lt;br /&gt;
The easiest way to think of probability is in terms of experiments and their potential outcomes.  Many examples can be drawn from everyday experience:  On the drive home from work, you can encounter a flat tire, or have an uneventful drive; the outcome of an election can include either a win by candidate A, B, or C, or a runoff.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Definition:&#039;&#039;&#039; The entire collection of possible outcomes from an experiment is termed the &#039;&#039;sample space&#039;&#039;, indicated as &#039;&#039;&#039;&amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The simplest (albeit uninteresting) example would be an experiment with only one possible outcome, say &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  If we remember our set theory from elementary school, we can express the sample space as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega = \{ A \} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A more interesting example is the result of rolling a six sided dice.  The sample space for this experiment is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega = \{ 1,2,3,4,5,6 \}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We may be interested in &#039;&#039;events&#039;&#039; in an experiment.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Definition:&#039;&#039;&#039; An &#039;&#039;event&#039;&#039; is some subset of outcomes from the &#039;&#039;sample space&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In the dice example, events of interest might include&amp;lt;br&amp;gt;&lt;br /&gt;
a) the outcome is an even number&amp;lt;br&amp;gt;&lt;br /&gt;
b) the outcome is less than three&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These events can be expressed in terms of the possible outcomes from the experiment: &amp;lt;br&amp;gt;&lt;br /&gt;
a) : &amp;lt;math&amp;gt; \{2,4,6\} &amp;lt;/math&amp;gt; b) : &amp;lt;math&amp;gt; \{ 1,2 \}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can borrow definitions from set theory to express events in terms of outcomes.  Here is a refresher of some terminology, and some new terms that will be important later: &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \cup &amp;lt;/math&amp;gt; represents the Union of two events&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:[http://en.wikipedia.org/wiki/Image:Venn_A_union_B.png]]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \cap &amp;lt;/math&amp;gt; represents the Interection of two events&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:[http://en.wikipedia.org/wiki/Image:Venn_A_intersect_B.png]]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\{\cdots\}^{c}&amp;lt;/math&amp;gt; represents the complement of an event.  For instance, &amp;quot;the outcome is an even number&amp;quot; is the complement of &amp;quot;the outcome is an odd number&amp;quot; in the dice example.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; A \backslash B &amp;lt;/math&amp;gt; represents &#039;&#039;difference&#039;&#039;, that is, &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; &#039;&#039;but not&#039;&#039; &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt;.  For example, we may be interested in the event of drawing the queen of spades from a deck of cards.  This can be expressed as the event of drawing a queen, but not drawing a queen of hearts, diamonds or clubs.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\varnothing&amp;lt;/math&amp;gt; or &amp;lt;math&amp;gt;\{\}&amp;lt;/math&amp;gt; represent an &#039;&#039;impossible event&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt; represents a &#039;&#039;certain event&#039;&#039; &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; are called &#039;&#039;disjoint events&#039;&#039; if &amp;lt;math&amp;gt;A\cap B = \varnothing&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Probability ==&lt;br /&gt;
Now that we know what events are, we should think a bit about a way to express the likelihood of an event occuring.  The classical definition of probability comes from the following.  If we can perform our experiment over and over in a way that is repeatable, we can count the number of times that the experiment gives rise to event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  We also keep track of the number of times that we perform the same experiment.  If we repeat the experiment a large enough number of times, we can express the probability of event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; as follows:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A) = \frac{N_{A}}{N} &amp;lt;/math&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;N_{A}&amp;lt;/math&amp;gt; is the number of times event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; occurred, and &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; is the number of times the experiment was repeated.  As &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; approaches infinity, the fraction above approaches the true probability of the event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  The value of &amp;lt;math&amp;gt;P(A)&amp;lt;/math&amp;gt; is clearly between 0 and 1.  If our event is the &#039;&#039;certain event&#039;&#039; &amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt;, then for each time we perform the experiment, the event &amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt; is observed; &amp;lt;math&amp;gt;N_{\Omega} = N&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;P(\Omega)=1&amp;lt;/math&amp;gt;.  If our event is the &#039;&#039;impossible event&#039;&#039; &amp;lt;math&amp;gt;\varnothing&amp;lt;/math&amp;gt;, we know &amp;lt;math&amp;gt;N_{\varnothing}=0&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; P(\varnothing) = 0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; are &#039;&#039;disjoint events&#039;&#039;, then whenever event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; is observed, then it is impossible for event &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; to be observed simultaneously.  Then&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;N(A\cup B) = N(A) + N(B)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Given our definition of probability, we can arrive at the following:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A\cup B) = P(A) + P(B)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At this point it&#039;s worth remembering that all events are not disjoint events.  I was originally confused by events and outcomes, and this was the source of many misunderstandings.  For events that are not disjoint, we end up with the following probability definition.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; P(A\cup B) = P(A) + P(B) - P(A\cap B)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
How can we see this from example?  Well, let&#039;s consider drawing from a deck of cards.  I&#039;ll define two &#039;&#039;events&#039;&#039;: &amp;quot;drawing a Queen&amp;quot;, and &amp;quot;drawing a Spade&amp;quot;.  We can tell off the bat that these are not disjoint events, because you can draw a queen that is also a spade.  There are four queens in the deck, so if we perform the experiment of drawing a card, putting it back in the deck and shuffling (what statisticians refer to as &#039;&#039;sampling with replacement&#039;&#039;, we will end up with a probability of &amp;lt;math&amp;gt;\frac{1}{13}&amp;lt;/math&amp;gt; for a queen draw.  By the same argument, we obtain a probability for drawing a spade as &amp;lt;math&amp;gt;\frac{1}{4}&amp;lt;/math&amp;gt;.  The expression &amp;lt;math&amp;gt;P(A\cup B)&amp;lt;/math&amp;gt; here can be translated as &amp;quot;the chance of drawing a queen or a spade&amp;quot;.  If we assume naively (as I used to) that for this case &amp;lt;math&amp;gt;P(A\cup B) = P(A) + P(B)&amp;lt;/math&amp;gt;, we can simply add our probabilities together for &amp;quot;the chance of drawing a queen or a spade&amp;quot; as &amp;lt;math&amp;gt;\frac{1}{13}+\frac{1}{4}&amp;lt;/math&amp;gt;.  If we were to gather some data experimentally, we would find that our results would differ from the prediction -- the probability observed would be slightly less than &amp;lt;math&amp;gt;\frac{1}{13}+\frac{1}{4}&amp;lt;/math&amp;gt;.  Why?  Because we&#039;re counting the queen of spades twice in our expression, once as a spade, and again as a queen.  We need to count it only once, as it can only be drawn with probability of &amp;lt;math&amp;gt;\frac{1}{52}&amp;lt;/math&amp;gt;.  [[Still confused?]] &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Proof:&#039;&#039;&#039; If &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; are not disjoint, we have to avoid the double counting problem by exactly specifying their union.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;A \cup B = A \cup (B \backslash A) &amp;lt;/math&amp;gt; so &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A \cup B) = P(A \cup (B \backslash A)) &amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B \backslash A&amp;lt;/math&amp;gt; are disjoint sets.  We can then use the definition of disjoint events from above to express our desired result:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A \cup B) = P(A) + P(B \backslash A)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
We also know that&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(B \backslash A) = P(B) - P(B\cap A)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
so&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; P(A \cup B) = P(A) + P(B) - P(B\cap A)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Whew!  Our first proof.  I hope that wasn&#039;t too too [[dry]].&lt;br /&gt;
&lt;br /&gt;
== Conditional Probability ==&lt;br /&gt;
Many events are conditional on the occurance of other events.  Sometimes this coupling is weak.  One event may become more or less probable depending on our knowledge that another event has occured.  For instance, the probability that your friends and relatives will call asking for money is likely to be higher if you win the lottery.  In my case, I don&#039;t think this probability would change.&lt;br /&gt;
&lt;br /&gt;
Let&#039;s get formal for a second and remember our original definition of probability.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A) = \frac{N_{A}}{N}&amp;lt;/math&amp;gt;&lt;br /&gt;
Consider an additional event &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt;, and a situation where we are only interested in the probability of the occurance of &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; when &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; occurs.  In the terminology of the previous section, we&#039;re interested in &amp;lt;math&amp;gt;P(A \cap B)&amp;lt;/math&amp;gt;.&lt;/div&gt;</summary>
		<author><name>69.118.80.7</name></author>
	</entry>
	<entry>
		<id>https://ideawaza.com/index.php?title=Introduction_to_Statistics&amp;diff=17040</id>
		<title>Introduction to Statistics</title>
		<link rel="alternate" type="text/html" href="https://ideawaza.com/index.php?title=Introduction_to_Statistics&amp;diff=17040"/>
		<updated>2005-06-29T15:29:56Z</updated>

		<summary type="html">&lt;p&gt;69.118.80.7: /* Conditional Probability */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Preamble ==&lt;br /&gt;
Probability and statistics is the most boring thing imaginable.  It&#039;s dull, unlike fancy math -- if you&#039;re ever at a cocktail party and want to impress someone, it&#039;s a lot easier to say you&#039;re a mathematician than to say you&#039;re a statistician.  It&#039;s also pretty abstract.  Most thorough explorations of the discipline are in very dry books that are short on examples.  If fact, if you&#039;re here it&#039;s probably because you&#039;re taking a stats class somewhere and your book and lecturer totally suck.  &lt;br /&gt;
&lt;br /&gt;
This aside, statistics is a central topic in modern life, and understanding just a little bit about it will help you a lot regardless of what you do or end up doing.  I hope this web site doesn&#039;t suck.  If it does, please leave comments on the discussion tab above.&lt;br /&gt;
&lt;br /&gt;
== Experiments, Outcomes and Events ==&lt;br /&gt;
&lt;br /&gt;
The easiest way to think of probability is in terms of experiments and their potential outcomes.  Many examples can be drawn from everyday experience:  On the drive home from work, you can encounter a flat tire, or have an uneventful drive; the outcome of an election can include either a win by candidate A, B, or C, or a runoff.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Definition:&#039;&#039;&#039; The entire collection of possible outcomes from an experiment is termed the &#039;&#039;sample space&#039;&#039;, indicated as &#039;&#039;&#039;&amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The simplest (albeit uninteresting) example would be an experiment with only one possible outcome, say &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  If we remember our set theory from elementary school, we can express the sample space as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega = \{ A \} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A more interesting example is the result of rolling a six sided dice.  The sample space for this experiment is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega = \{ 1,2,3,4,5,6 \}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We may be interested in &#039;&#039;events&#039;&#039; in an experiment.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Definition:&#039;&#039;&#039; An &#039;&#039;event&#039;&#039; is some subset of outcomes from the &#039;&#039;sample space&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In the dice example, events of interest might include&amp;lt;br&amp;gt;&lt;br /&gt;
a) the outcome is an even number&amp;lt;br&amp;gt;&lt;br /&gt;
b) the outcome is less than three&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These events can be expressed in terms of the possible outcomes from the experiment: &amp;lt;br&amp;gt;&lt;br /&gt;
a) : &amp;lt;math&amp;gt; \{2,4,6\} &amp;lt;/math&amp;gt; b) : &amp;lt;math&amp;gt; \{ 1,2 \}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can borrow definitions from set theory to express events in terms of outcomes.  Here is a refresher of some terminology, and some new terms that will be important later: &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \cup &amp;lt;/math&amp;gt; represents the Union of two events&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:[http://en.wikipedia.org/wiki/Image:Venn_A_union_B.png]]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \cap &amp;lt;/math&amp;gt; represents the Interection of two events&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:[http://en.wikipedia.org/wiki/Image:Venn_A_intersect_B.png]]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\{\cdots\}^{c}&amp;lt;/math&amp;gt; represents the complement of an event.  For instance, &amp;quot;the outcome is an even number&amp;quot; is the complement of &amp;quot;the outcome is an odd number&amp;quot; in the dice example.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; A \backslash B &amp;lt;/math&amp;gt; represents &#039;&#039;difference&#039;&#039;, that is, &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; &#039;&#039;but not&#039;&#039; &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt;.  For example, we may be interested in the event of drawing the queen of spades from a deck of cards.  This can be expressed as the event of drawing a queen, but not drawing a queen of hearts, diamonds or clubs.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\varnothing&amp;lt;/math&amp;gt; or &amp;lt;math&amp;gt;\{\}&amp;lt;/math&amp;gt; represent an &#039;&#039;impossible event&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt; represents a &#039;&#039;certain event&#039;&#039; &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; are called &#039;&#039;disjoint events&#039;&#039; if &amp;lt;math&amp;gt;A\cap B = \varnothing&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Probability ==&lt;br /&gt;
Now that we know what events are, we should think a bit about a way to express the likelihood of an event occuring.  The classical definition of probability comes from the following.  If we can perform our experiment over and over in a way that is repeatable, we can count the number of times that the experiment gives rise to event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  We also keep track of the number of times that we perform the same experiment.  If we repeat the experiment a large enough number of times, we can express the probability of event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; as follows:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A) = \frac{N_{A}}{N} &amp;lt;/math&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;N_{A}&amp;lt;/math&amp;gt; is the number of times event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; occurred, and &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; is the number of times the experiment was repeated.  As &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; approaches infinity, the fraction above approaches the true probability of the event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  The value of &amp;lt;math&amp;gt;P(A)&amp;lt;/math&amp;gt; is clearly between 0 and 1.  If our event is the &#039;&#039;certain event&#039;&#039; &amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt;, then for each time we perform the experiment, the event &amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt; is observed; &amp;lt;math&amp;gt;N_{\Omega} = N&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;P(\Omega)=1&amp;lt;/math&amp;gt;.  If our event is the &#039;&#039;impossible event&#039;&#039; &amp;lt;math&amp;gt;\varnothing&amp;lt;/math&amp;gt;, we know &amp;lt;math&amp;gt;N_{\varnothing}=0&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; P(\varnothing) = 0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; are &#039;&#039;disjoint events&#039;&#039;, then whenever event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; is observed, then it is impossible for event &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; to be observed simultaneously.  Then&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;N(A\cup B) = N(A) + N(B)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Given our definition of probability, we can arrive at the following:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A\cup B) = P(A) + P(B)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At this point it&#039;s worth remembering that all events are not disjoint events.  I was originally confused by events and outcomes, and this was the source of many misunderstandings.  For events that are not disjoint, we end up with the following probability definition.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; P(A\cup B) = P(A) + P(B) - P(A\cap B)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
How can we see this from example?  Well, let&#039;s consider drawing from a deck of cards.  I&#039;ll define two &#039;&#039;events&#039;&#039;: &amp;quot;drawing a Queen&amp;quot;, and &amp;quot;drawing a Spade&amp;quot;.  We can tell off the bat that these are not disjoint events, because you can draw a queen that is also a spade.  There are four queens in the deck, so if we perform the experiment of drawing a card, putting it back in the deck and shuffling (what statisticians refer to as &#039;&#039;sampling with replacement&#039;&#039;, we will end up with a probability of &amp;lt;math&amp;gt;\frac{1}{13}&amp;lt;/math&amp;gt; for a queen draw.  By the same argument, we obtain a probability for drawing a spade as &amp;lt;math&amp;gt;\frac{1}{4}&amp;lt;/math&amp;gt;.  The expression &amp;lt;math&amp;gt;P(A\cup B)&amp;lt;/math&amp;gt; here can be translated as &amp;quot;the chance of drawing a queen or a spade&amp;quot;.  If we assume naively (as I used to) that for this case &amp;lt;math&amp;gt;P(A\cup B) = P(A) + P(B)&amp;lt;/math&amp;gt;, we can simply add our probabilities together for &amp;quot;the chance of drawing a queen or a spade&amp;quot; as &amp;lt;math&amp;gt;\frac{1}{13}+\frac{1}{4}&amp;lt;/math&amp;gt;.  If we were to gather some data experimentally, we would find that our results would differ from the prediction -- the probability observed would be slightly less than &amp;lt;math&amp;gt;\frac{1}{13}+\frac{1}{4}&amp;lt;/math&amp;gt;.  Why?  Because we&#039;re counting the queen of spades twice in our expression, once as a spade, and again as a queen.  We need to count it only once, as it can only be drawn with probability of &amp;lt;math&amp;gt;\frac{1}{52}&amp;lt;/math&amp;gt;.  [[Still confused?]] &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Proof:&#039;&#039;&#039; If &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; are not disjoint, we have to avoid the double counting problem by exactly specifying their union.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;A \cup B = A \cup (B \backslash A) &amp;lt;/math&amp;gt; so &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A \cup B) = P(A \cup (B \backslash A)) &amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B \backslash A&amp;lt;/math&amp;gt; are disjoint sets.  We can then use the definition of disjoint events from above to express our desired result:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A \cup B) = P(A) + P(B \backslash A)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
We also know that&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(B \backslash A) = P(B) - P(B\cap A)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
so&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; P(A \cup B) = P(A) + P(B) - P(B\cap A)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Whew!  Our first proof.  I hope that wasn&#039;t too too [[dry]].&lt;br /&gt;
&lt;br /&gt;
== Conditional Probability ==&lt;br /&gt;
Many events are conditional on the occurance of other events.  Sometimes this coupling is weak.  One event may become more or less probable depending on our knowledge that another event has occured.  For instance, the probability that your friends and relatives will call asking for money is likely to be higher if you win the lottery.  In my case, I don&#039;t think this probability would change.&lt;br /&gt;
&lt;br /&gt;
Let&#039;s get formal for a second and remember our original definition of probability.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A) = \frac{N_{A}}{N}&amp;lt;/math&amp;gt;&lt;/div&gt;</summary>
		<author><name>69.118.80.7</name></author>
	</entry>
	<entry>
		<id>https://ideawaza.com/index.php?title=Introduction_to_Statistics&amp;diff=17039</id>
		<title>Introduction to Statistics</title>
		<link rel="alternate" type="text/html" href="https://ideawaza.com/index.php?title=Introduction_to_Statistics&amp;diff=17039"/>
		<updated>2005-06-29T15:23:21Z</updated>

		<summary type="html">&lt;p&gt;69.118.80.7: /* Conditional Probability */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Preamble ==&lt;br /&gt;
Probability and statistics is the most boring thing imaginable.  It&#039;s dull, unlike fancy math -- if you&#039;re ever at a cocktail party and want to impress someone, it&#039;s a lot easier to say you&#039;re a mathematician than to say you&#039;re a statistician.  It&#039;s also pretty abstract.  Most thorough explorations of the discipline are in very dry books that are short on examples.  If fact, if you&#039;re here it&#039;s probably because you&#039;re taking a stats class somewhere and your book and lecturer totally suck.  &lt;br /&gt;
&lt;br /&gt;
This aside, statistics is a central topic in modern life, and understanding just a little bit about it will help you a lot regardless of what you do or end up doing.  I hope this web site doesn&#039;t suck.  If it does, please leave comments on the discussion tab above.&lt;br /&gt;
&lt;br /&gt;
== Experiments, Outcomes and Events ==&lt;br /&gt;
&lt;br /&gt;
The easiest way to think of probability is in terms of experiments and their potential outcomes.  Many examples can be drawn from everyday experience:  On the drive home from work, you can encounter a flat tire, or have an uneventful drive; the outcome of an election can include either a win by candidate A, B, or C, or a runoff.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Definition:&#039;&#039;&#039; The entire collection of possible outcomes from an experiment is termed the &#039;&#039;sample space&#039;&#039;, indicated as &#039;&#039;&#039;&amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The simplest (albeit uninteresting) example would be an experiment with only one possible outcome, say &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  If we remember our set theory from elementary school, we can express the sample space as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega = \{ A \} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A more interesting example is the result of rolling a six sided dice.  The sample space for this experiment is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega = \{ 1,2,3,4,5,6 \}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We may be interested in &#039;&#039;events&#039;&#039; in an experiment.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Definition:&#039;&#039;&#039; An &#039;&#039;event&#039;&#039; is some subset of outcomes from the &#039;&#039;sample space&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In the dice example, events of interest might include&amp;lt;br&amp;gt;&lt;br /&gt;
a) the outcome is an even number&amp;lt;br&amp;gt;&lt;br /&gt;
b) the outcome is less than three&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These events can be expressed in terms of the possible outcomes from the experiment: &amp;lt;br&amp;gt;&lt;br /&gt;
a) : &amp;lt;math&amp;gt; \{2,4,6\} &amp;lt;/math&amp;gt; b) : &amp;lt;math&amp;gt; \{ 1,2 \}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can borrow definitions from set theory to express events in terms of outcomes.  Here is a refresher of some terminology, and some new terms that will be important later: &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \cup &amp;lt;/math&amp;gt; represents the Union of two events&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:[http://en.wikipedia.org/wiki/Image:Venn_A_union_B.png]]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \cap &amp;lt;/math&amp;gt; represents the Interection of two events&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:[http://en.wikipedia.org/wiki/Image:Venn_A_intersect_B.png]]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\{\cdots\}^{c}&amp;lt;/math&amp;gt; represents the complement of an event.  For instance, &amp;quot;the outcome is an even number&amp;quot; is the complement of &amp;quot;the outcome is an odd number&amp;quot; in the dice example.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; A \backslash B &amp;lt;/math&amp;gt; represents &#039;&#039;difference&#039;&#039;, that is, &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; &#039;&#039;but not&#039;&#039; &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt;.  For example, we may be interested in the event of drawing the queen of spades from a deck of cards.  This can be expressed as the event of drawing a queen, but not drawing a queen of hearts, diamonds or clubs.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\varnothing&amp;lt;/math&amp;gt; or &amp;lt;math&amp;gt;\{\}&amp;lt;/math&amp;gt; represent an &#039;&#039;impossible event&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt; represents a &#039;&#039;certain event&#039;&#039; &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; are called &#039;&#039;disjoint events&#039;&#039; if &amp;lt;math&amp;gt;A\cap B = \varnothing&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Probability ==&lt;br /&gt;
Now that we know what events are, we should think a bit about a way to express the likelihood of an event occuring.  The classical definition of probability comes from the following.  If we can perform our experiment over and over in a way that is repeatable, we can count the number of times that the experiment gives rise to event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  We also keep track of the number of times that we perform the same experiment.  If we repeat the experiment a large enough number of times, we can express the probability of event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; as follows:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A) = \frac{N_{A}}{N} &amp;lt;/math&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;N_{A}&amp;lt;/math&amp;gt; is the number of times event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; occurred, and &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; is the number of times the experiment was repeated.  As &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; approaches infinity, the fraction above approaches the true probability of the event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  The value of &amp;lt;math&amp;gt;P(A)&amp;lt;/math&amp;gt; is clearly between 0 and 1.  If our event is the &#039;&#039;certain event&#039;&#039; &amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt;, then for each time we perform the experiment, the event &amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt; is observed; &amp;lt;math&amp;gt;N_{\Omega} = N&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;P(\Omega)=1&amp;lt;/math&amp;gt;.  If our event is the &#039;&#039;impossible event&#039;&#039; &amp;lt;math&amp;gt;\varnothing&amp;lt;/math&amp;gt;, we know &amp;lt;math&amp;gt;N_{\varnothing}=0&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; P(\varnothing) = 0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; are &#039;&#039;disjoint events&#039;&#039;, then whenever event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; is observed, then it is impossible for event &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; to be observed simultaneously.  Then&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;N(A\cup B) = N(A) + N(B)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Given our definition of probability, we can arrive at the following:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A\cup B) = P(A) + P(B)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At this point it&#039;s worth remembering that all events are not disjoint events.  I was originally confused by events and outcomes, and this was the source of many misunderstandings.  For events that are not disjoint, we end up with the following probability definition.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; P(A\cup B) = P(A) + P(B) - P(A\cap B)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
How can we see this from example?  Well, let&#039;s consider drawing from a deck of cards.  I&#039;ll define two &#039;&#039;events&#039;&#039;: &amp;quot;drawing a Queen&amp;quot;, and &amp;quot;drawing a Spade&amp;quot;.  We can tell off the bat that these are not disjoint events, because you can draw a queen that is also a spade.  There are four queens in the deck, so if we perform the experiment of drawing a card, putting it back in the deck and shuffling (what statisticians refer to as &#039;&#039;sampling with replacement&#039;&#039;, we will end up with a probability of &amp;lt;math&amp;gt;\frac{1}{13}&amp;lt;/math&amp;gt; for a queen draw.  By the same argument, we obtain a probability for drawing a spade as &amp;lt;math&amp;gt;\frac{1}{4}&amp;lt;/math&amp;gt;.  The expression &amp;lt;math&amp;gt;P(A\cup B)&amp;lt;/math&amp;gt; here can be translated as &amp;quot;the chance of drawing a queen or a spade&amp;quot;.  If we assume naively (as I used to) that for this case &amp;lt;math&amp;gt;P(A\cup B) = P(A) + P(B)&amp;lt;/math&amp;gt;, we can simply add our probabilities together for &amp;quot;the chance of drawing a queen or a spade&amp;quot; as &amp;lt;math&amp;gt;\frac{1}{13}+\frac{1}{4}&amp;lt;/math&amp;gt;.  If we were to gather some data experimentally, we would find that our results would differ from the prediction -- the probability observed would be slightly less than &amp;lt;math&amp;gt;\frac{1}{13}+\frac{1}{4}&amp;lt;/math&amp;gt;.  Why?  Because we&#039;re counting the queen of spades twice in our expression, once as a spade, and again as a queen.  We need to count it only once, as it can only be drawn with probability of &amp;lt;math&amp;gt;\frac{1}{52}&amp;lt;/math&amp;gt;.  [[Still confused?]] &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Proof:&#039;&#039;&#039; If &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; are not disjoint, we have to avoid the double counting problem by exactly specifying their union.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;A \cup B = A \cup (B \backslash A) &amp;lt;/math&amp;gt; so &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A \cup B) = P(A \cup (B \backslash A)) &amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B \backslash A&amp;lt;/math&amp;gt; are disjoint sets.  We can then use the definition of disjoint events from above to express our desired result:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A \cup B) = P(A) + P(B \backslash A)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
We also know that&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(B \backslash A) = P(B) - P(B\cap A)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
so&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; P(A \cup B) = P(A) + P(B) - P(B\cap A)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Whew!  Our first proof.  I hope that wasn&#039;t too too [[dry]].&lt;br /&gt;
&lt;br /&gt;
== Conditional Probability ==&lt;br /&gt;
Many events are conditional on the occurance of other events.  Sometimes this coupling is weak.  One event may become more or less probable depending on our knowledge that another event has occured.  For instance, the probability that your friends and relatives will call asking for money is likely to be higher if you win the lottery.&lt;/div&gt;</summary>
		<author><name>69.118.80.7</name></author>
	</entry>
	<entry>
		<id>https://ideawaza.com/index.php?title=Introduction_to_Statistics&amp;diff=17038</id>
		<title>Introduction to Statistics</title>
		<link rel="alternate" type="text/html" href="https://ideawaza.com/index.php?title=Introduction_to_Statistics&amp;diff=17038"/>
		<updated>2005-06-29T15:14:15Z</updated>

		<summary type="html">&lt;p&gt;69.118.80.7: /* Probability */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Preamble ==&lt;br /&gt;
Probability and statistics is the most boring thing imaginable.  It&#039;s dull, unlike fancy math -- if you&#039;re ever at a cocktail party and want to impress someone, it&#039;s a lot easier to say you&#039;re a mathematician than to say you&#039;re a statistician.  It&#039;s also pretty abstract.  Most thorough explorations of the discipline are in very dry books that are short on examples.  If fact, if you&#039;re here it&#039;s probably because you&#039;re taking a stats class somewhere and your book and lecturer totally suck.  &lt;br /&gt;
&lt;br /&gt;
This aside, statistics is a central topic in modern life, and understanding just a little bit about it will help you a lot regardless of what you do or end up doing.  I hope this web site doesn&#039;t suck.  If it does, please leave comments on the discussion tab above.&lt;br /&gt;
&lt;br /&gt;
== Experiments, Outcomes and Events ==&lt;br /&gt;
&lt;br /&gt;
The easiest way to think of probability is in terms of experiments and their potential outcomes.  Many examples can be drawn from everyday experience:  On the drive home from work, you can encounter a flat tire, or have an uneventful drive; the outcome of an election can include either a win by candidate A, B, or C, or a runoff.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Definition:&#039;&#039;&#039; The entire collection of possible outcomes from an experiment is termed the &#039;&#039;sample space&#039;&#039;, indicated as &#039;&#039;&#039;&amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The simplest (albeit uninteresting) example would be an experiment with only one possible outcome, say &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  If we remember our set theory from elementary school, we can express the sample space as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega = \{ A \} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A more interesting example is the result of rolling a six sided dice.  The sample space for this experiment is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega = \{ 1,2,3,4,5,6 \}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We may be interested in &#039;&#039;events&#039;&#039; in an experiment.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Definition:&#039;&#039;&#039; An &#039;&#039;event&#039;&#039; is some subset of outcomes from the &#039;&#039;sample space&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In the dice example, events of interest might include&amp;lt;br&amp;gt;&lt;br /&gt;
a) the outcome is an even number&amp;lt;br&amp;gt;&lt;br /&gt;
b) the outcome is less than three&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These events can be expressed in terms of the possible outcomes from the experiment: &amp;lt;br&amp;gt;&lt;br /&gt;
a) : &amp;lt;math&amp;gt; \{2,4,6\} &amp;lt;/math&amp;gt; b) : &amp;lt;math&amp;gt; \{ 1,2 \}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can borrow definitions from set theory to express events in terms of outcomes.  Here is a refresher of some terminology, and some new terms that will be important later: &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \cup &amp;lt;/math&amp;gt; represents the Union of two events&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:[http://en.wikipedia.org/wiki/Image:Venn_A_union_B.png]]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \cap &amp;lt;/math&amp;gt; represents the Interection of two events&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:[http://en.wikipedia.org/wiki/Image:Venn_A_intersect_B.png]]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\{\cdots\}^{c}&amp;lt;/math&amp;gt; represents the complement of an event.  For instance, &amp;quot;the outcome is an even number&amp;quot; is the complement of &amp;quot;the outcome is an odd number&amp;quot; in the dice example.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; A \backslash B &amp;lt;/math&amp;gt; represents &#039;&#039;difference&#039;&#039;, that is, &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; &#039;&#039;but not&#039;&#039; &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt;.  For example, we may be interested in the event of drawing the queen of spades from a deck of cards.  This can be expressed as the event of drawing a queen, but not drawing a queen of hearts, diamonds or clubs.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\varnothing&amp;lt;/math&amp;gt; or &amp;lt;math&amp;gt;\{\}&amp;lt;/math&amp;gt; represent an &#039;&#039;impossible event&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt; represents a &#039;&#039;certain event&#039;&#039; &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; are called &#039;&#039;disjoint events&#039;&#039; if &amp;lt;math&amp;gt;A\cap B = \varnothing&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Probability ==&lt;br /&gt;
Now that we know what events are, we should think a bit about a way to express the likelihood of an event occuring.  The classical definition of probability comes from the following.  If we can perform our experiment over and over in a way that is repeatable, we can count the number of times that the experiment gives rise to event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  We also keep track of the number of times that we perform the same experiment.  If we repeat the experiment a large enough number of times, we can express the probability of event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; as follows:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A) = \frac{N_{A}}{N} &amp;lt;/math&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;N_{A}&amp;lt;/math&amp;gt; is the number of times event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; occurred, and &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; is the number of times the experiment was repeated.  As &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; approaches infinity, the fraction above approaches the true probability of the event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  The value of &amp;lt;math&amp;gt;P(A)&amp;lt;/math&amp;gt; is clearly between 0 and 1.  If our event is the &#039;&#039;certain event&#039;&#039; &amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt;, then for each time we perform the experiment, the event &amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt; is observed; &amp;lt;math&amp;gt;N_{\Omega} = N&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;P(\Omega)=1&amp;lt;/math&amp;gt;.  If our event is the &#039;&#039;impossible event&#039;&#039; &amp;lt;math&amp;gt;\varnothing&amp;lt;/math&amp;gt;, we know &amp;lt;math&amp;gt;N_{\varnothing}=0&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; P(\varnothing) = 0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; are &#039;&#039;disjoint events&#039;&#039;, then whenever event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; is observed, then it is impossible for event &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; to be observed simultaneously.  Then&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;N(A\cup B) = N(A) + N(B)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Given our definition of probability, we can arrive at the following:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A\cup B) = P(A) + P(B)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At this point it&#039;s worth remembering that all events are not disjoint events.  I was originally confused by events and outcomes, and this was the source of many misunderstandings.  For events that are not disjoint, we end up with the following probability definition.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; P(A\cup B) = P(A) + P(B) - P(A\cap B)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
How can we see this from example?  Well, let&#039;s consider drawing from a deck of cards.  I&#039;ll define two &#039;&#039;events&#039;&#039;: &amp;quot;drawing a Queen&amp;quot;, and &amp;quot;drawing a Spade&amp;quot;.  We can tell off the bat that these are not disjoint events, because you can draw a queen that is also a spade.  There are four queens in the deck, so if we perform the experiment of drawing a card, putting it back in the deck and shuffling (what statisticians refer to as &#039;&#039;sampling with replacement&#039;&#039;, we will end up with a probability of &amp;lt;math&amp;gt;\frac{1}{13}&amp;lt;/math&amp;gt; for a queen draw.  By the same argument, we obtain a probability for drawing a spade as &amp;lt;math&amp;gt;\frac{1}{4}&amp;lt;/math&amp;gt;.  The expression &amp;lt;math&amp;gt;P(A\cup B)&amp;lt;/math&amp;gt; here can be translated as &amp;quot;the chance of drawing a queen or a spade&amp;quot;.  If we assume naively (as I used to) that for this case &amp;lt;math&amp;gt;P(A\cup B) = P(A) + P(B)&amp;lt;/math&amp;gt;, we can simply add our probabilities together for &amp;quot;the chance of drawing a queen or a spade&amp;quot; as &amp;lt;math&amp;gt;\frac{1}{13}+\frac{1}{4}&amp;lt;/math&amp;gt;.  If we were to gather some data experimentally, we would find that our results would differ from the prediction -- the probability observed would be slightly less than &amp;lt;math&amp;gt;\frac{1}{13}+\frac{1}{4}&amp;lt;/math&amp;gt;.  Why?  Because we&#039;re counting the queen of spades twice in our expression, once as a spade, and again as a queen.  We need to count it only once, as it can only be drawn with probability of &amp;lt;math&amp;gt;\frac{1}{52}&amp;lt;/math&amp;gt;.  [[Still confused?]] &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Proof:&#039;&#039;&#039; If &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; are not disjoint, we have to avoid the double counting problem by exactly specifying their union.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;A \cup B = A \cup (B \backslash A) &amp;lt;/math&amp;gt; so &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A \cup B) = P(A \cup (B \backslash A)) &amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B \backslash A&amp;lt;/math&amp;gt; are disjoint sets.  We can then use the definition of disjoint events from above to express our desired result:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A \cup B) = P(A) + P(B \backslash A)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
We also know that&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(B \backslash A) = P(B) - P(B\cap A)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
so&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; P(A \cup B) = P(A) + P(B) - P(B\cap A)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Whew!  Our first proof.  I hope that wasn&#039;t too too [[dry]].&lt;br /&gt;
&lt;br /&gt;
== Conditional Probability ==&lt;/div&gt;</summary>
		<author><name>69.118.80.7</name></author>
	</entry>
	<entry>
		<id>https://ideawaza.com/index.php?title=Introduction_to_Statistics&amp;diff=17037</id>
		<title>Introduction to Statistics</title>
		<link rel="alternate" type="text/html" href="https://ideawaza.com/index.php?title=Introduction_to_Statistics&amp;diff=17037"/>
		<updated>2005-06-29T15:11:28Z</updated>

		<summary type="html">&lt;p&gt;69.118.80.7: /* Probability */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Preamble ==&lt;br /&gt;
Probability and statistics is the most boring thing imaginable.  It&#039;s dull, unlike fancy math -- if you&#039;re ever at a cocktail party and want to impress someone, it&#039;s a lot easier to say you&#039;re a mathematician than to say you&#039;re a statistician.  It&#039;s also pretty abstract.  Most thorough explorations of the discipline are in very dry books that are short on examples.  If fact, if you&#039;re here it&#039;s probably because you&#039;re taking a stats class somewhere and your book and lecturer totally suck.  &lt;br /&gt;
&lt;br /&gt;
This aside, statistics is a central topic in modern life, and understanding just a little bit about it will help you a lot regardless of what you do or end up doing.  I hope this web site doesn&#039;t suck.  If it does, please leave comments on the discussion tab above.&lt;br /&gt;
&lt;br /&gt;
== Experiments, Outcomes and Events ==&lt;br /&gt;
&lt;br /&gt;
The easiest way to think of probability is in terms of experiments and their potential outcomes.  Many examples can be drawn from everyday experience:  On the drive home from work, you can encounter a flat tire, or have an uneventful drive; the outcome of an election can include either a win by candidate A, B, or C, or a runoff.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Definition:&#039;&#039;&#039; The entire collection of possible outcomes from an experiment is termed the &#039;&#039;sample space&#039;&#039;, indicated as &#039;&#039;&#039;&amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The simplest (albeit uninteresting) example would be an experiment with only one possible outcome, say &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  If we remember our set theory from elementary school, we can express the sample space as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega = \{ A \} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A more interesting example is the result of rolling a six sided dice.  The sample space for this experiment is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega = \{ 1,2,3,4,5,6 \}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We may be interested in &#039;&#039;events&#039;&#039; in an experiment.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Definition:&#039;&#039;&#039; An &#039;&#039;event&#039;&#039; is some subset of outcomes from the &#039;&#039;sample space&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In the dice example, events of interest might include&amp;lt;br&amp;gt;&lt;br /&gt;
a) the outcome is an even number&amp;lt;br&amp;gt;&lt;br /&gt;
b) the outcome is less than three&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These events can be expressed in terms of the possible outcomes from the experiment: &amp;lt;br&amp;gt;&lt;br /&gt;
a) : &amp;lt;math&amp;gt; \{2,4,6\} &amp;lt;/math&amp;gt; b) : &amp;lt;math&amp;gt; \{ 1,2 \}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can borrow definitions from set theory to express events in terms of outcomes.  Here is a refresher of some terminology, and some new terms that will be important later: &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \cup &amp;lt;/math&amp;gt; represents the Union of two events&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:[http://en.wikipedia.org/wiki/Image:Venn_A_union_B.png]]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \cap &amp;lt;/math&amp;gt; represents the Interection of two events&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:[http://en.wikipedia.org/wiki/Image:Venn_A_intersect_B.png]]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\{\cdots\}^{c}&amp;lt;/math&amp;gt; represents the complement of an event.  For instance, &amp;quot;the outcome is an even number&amp;quot; is the complement of &amp;quot;the outcome is an odd number&amp;quot; in the dice example.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; A \backslash B &amp;lt;/math&amp;gt; represents &#039;&#039;difference&#039;&#039;, that is, &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; &#039;&#039;but not&#039;&#039; &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt;.  For example, we may be interested in the event of drawing the queen of spades from a deck of cards.  This can be expressed as the event of drawing a queen, but not drawing a queen of hearts, diamonds or clubs.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\varnothing&amp;lt;/math&amp;gt; or &amp;lt;math&amp;gt;\{\}&amp;lt;/math&amp;gt; represent an &#039;&#039;impossible event&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt; represents a &#039;&#039;certain event&#039;&#039; &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; are called &#039;&#039;disjoint events&#039;&#039; if &amp;lt;math&amp;gt;A\cap B = \varnothing&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Probability ==&lt;br /&gt;
Now that we know what events are, we should think a bit about a way to express the likelihood of an event occuring.  The classical definition of probability comes from the following.  If we can perform our experiment over and over in a way that is repeatable, we can count the number of times that the experiment gives rise to event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  We also keep track of the number of times that we perform the same experiment.  If we repeat the experiment a large enough number of times, we can express the probability of event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; as follows:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A) = \frac{N_{A}}{N} &amp;lt;/math&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;N_{A}&amp;lt;/math&amp;gt; is the number of times event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; occurred, and &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; is the number of times the experiment was repeated.  As &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; approaches infinity, the fraction above approaches the true probability of the event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  The value of &amp;lt;math&amp;gt;P(A)&amp;lt;/math&amp;gt; is clearly between 0 and 1.  If our event is the &#039;&#039;certain event&#039;&#039; &amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt;, then for each time we perform the experiment, the event &amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt; is observed; &amp;lt;math&amp;gt;N_{\Omega} = N&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;P(\Omega)=1&amp;lt;/math&amp;gt;.  If our event is the &#039;&#039;impossible event&#039;&#039; &amp;lt;math&amp;gt;\varnothing&amp;lt;/math&amp;gt;, we know &amp;lt;math&amp;gt;N_{\varnothing}=0&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; P(\varnothing) = 0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; are &#039;&#039;disjoint events&#039;&#039;, then whenever event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; is observed, then it is impossible for event &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; to be observed simultaneously.  Then&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;N(A\cup B) = N(A) + N(B)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Given our definition of probability, we can arrive at the following:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A\cup B) = P(A) + P(B)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At this point it&#039;s worth remembering that all events are not disjoint events.  I was originally confused by events and outcomes, and this was the source of many misunderstandings.  For events that are not disjoint, we end up with the following probability definition.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; P(A\cup B) = P(A) + P(B) - P(A\cap B)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
How can we see this from example?  Well, let&#039;s consider drawing from a deck of cards.  I&#039;ll define two &#039;&#039;events&#039;&#039;: &amp;quot;drawing a Queen&amp;quot;, and &amp;quot;drawing a Spade&amp;quot;.  We can tell off the bat that these are not disjoint events, because you can draw a queen that is also a spade.  There are four queens in the deck, so if we perform the experiment of drawing a card, putting it back in the deck and shuffling (what statisticians refer to as &#039;&#039;sampling with replacement&#039;&#039;, we will end up with a probability of &amp;lt;math&amp;gt;\frac{1}{13}&amp;lt;/math&amp;gt; for a queen draw.  By the same argument, we obtain a probability for drawing a spade as &amp;lt;math&amp;gt;\frac{1}{4}&amp;lt;/math&amp;gt;.  The expression &amp;lt;math&amp;gt;P(A\cup B)&amp;lt;/math&amp;gt; here can be translated as &amp;quot;the chance of drawing a queen or a spade&amp;quot;.  If we assume naively (as I used to) that for this case &amp;lt;math&amp;gt;P(A\cup B) = P(A) + P(B)&amp;lt;/math&amp;gt;, we can simply add our probabilities together for &amp;quot;the chance of drawing a queen or a spade&amp;quot; as &amp;lt;math&amp;gt;\frac{1}{13}+\frac{1}{4}&amp;lt;/math&amp;gt;.  If we were to gather some data experimentally, we would find that our results would differ from the prediction -- the probability observed would be slightly less than &amp;lt;math&amp;gt;\frac{1}{13}+\frac{1}{4}&amp;lt;/math&amp;gt;.  Why?  Because we&#039;re counting the queen of spades twice in our expression, once as a spade, and again as a queen.  We need to count it only once, as it can only be drawn with probability of &amp;lt;math&amp;gt;\frac{1}{52}&amp;lt;/math&amp;gt;.  [[Still confused?]] &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Proof:&#039;&#039;&#039; If &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; are not disjoint, we have to avoid the double counting problem by exactly specifying their union.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;A \cup B = A \cup (B \backslash A) &amp;lt;/math&amp;gt; so &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A \cup B) = P(A \cup (B \backslash A)) &amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B \backslash A&amp;lt;/math&amp;gt; are disjoint sets.  We can then use the definition of disjoint events from above to express our desired result:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A \cup B) = P(A) + P(B \backslash A)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
We also know that&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(B \backslash A) = P(B) - P(B\cap A)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
so&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; P(A \cup B) = P(A) + P(B) - P(B\cap A)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Whew!  Our first proof.  I hope that wasn&#039;t too too [[dry]].&lt;/div&gt;</summary>
		<author><name>69.118.80.7</name></author>
	</entry>
	<entry>
		<id>https://ideawaza.com/index.php?title=Introduction_to_Statistics&amp;diff=17036</id>
		<title>Introduction to Statistics</title>
		<link rel="alternate" type="text/html" href="https://ideawaza.com/index.php?title=Introduction_to_Statistics&amp;diff=17036"/>
		<updated>2005-06-29T15:09:55Z</updated>

		<summary type="html">&lt;p&gt;69.118.80.7: /* Probability */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Preamble ==&lt;br /&gt;
Probability and statistics is the most boring thing imaginable.  It&#039;s dull, unlike fancy math -- if you&#039;re ever at a cocktail party and want to impress someone, it&#039;s a lot easier to say you&#039;re a mathematician than to say you&#039;re a statistician.  It&#039;s also pretty abstract.  Most thorough explorations of the discipline are in very dry books that are short on examples.  If fact, if you&#039;re here it&#039;s probably because you&#039;re taking a stats class somewhere and your book and lecturer totally suck.  &lt;br /&gt;
&lt;br /&gt;
This aside, statistics is a central topic in modern life, and understanding just a little bit about it will help you a lot regardless of what you do or end up doing.  I hope this web site doesn&#039;t suck.  If it does, please leave comments on the discussion tab above.&lt;br /&gt;
&lt;br /&gt;
== Experiments, Outcomes and Events ==&lt;br /&gt;
&lt;br /&gt;
The easiest way to think of probability is in terms of experiments and their potential outcomes.  Many examples can be drawn from everyday experience:  On the drive home from work, you can encounter a flat tire, or have an uneventful drive; the outcome of an election can include either a win by candidate A, B, or C, or a runoff.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Definition:&#039;&#039;&#039; The entire collection of possible outcomes from an experiment is termed the &#039;&#039;sample space&#039;&#039;, indicated as &#039;&#039;&#039;&amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The simplest (albeit uninteresting) example would be an experiment with only one possible outcome, say &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  If we remember our set theory from elementary school, we can express the sample space as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega = \{ A \} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A more interesting example is the result of rolling a six sided dice.  The sample space for this experiment is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega = \{ 1,2,3,4,5,6 \}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We may be interested in &#039;&#039;events&#039;&#039; in an experiment.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Definition:&#039;&#039;&#039; An &#039;&#039;event&#039;&#039; is some subset of outcomes from the &#039;&#039;sample space&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In the dice example, events of interest might include&amp;lt;br&amp;gt;&lt;br /&gt;
a) the outcome is an even number&amp;lt;br&amp;gt;&lt;br /&gt;
b) the outcome is less than three&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These events can be expressed in terms of the possible outcomes from the experiment: &amp;lt;br&amp;gt;&lt;br /&gt;
a) : &amp;lt;math&amp;gt; \{2,4,6\} &amp;lt;/math&amp;gt; b) : &amp;lt;math&amp;gt; \{ 1,2 \}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can borrow definitions from set theory to express events in terms of outcomes.  Here is a refresher of some terminology, and some new terms that will be important later: &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \cup &amp;lt;/math&amp;gt; represents the Union of two events&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:[http://en.wikipedia.org/wiki/Image:Venn_A_union_B.png]]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \cap &amp;lt;/math&amp;gt; represents the Interection of two events&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:[http://en.wikipedia.org/wiki/Image:Venn_A_intersect_B.png]]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\{\cdots\}^{c}&amp;lt;/math&amp;gt; represents the complement of an event.  For instance, &amp;quot;the outcome is an even number&amp;quot; is the complement of &amp;quot;the outcome is an odd number&amp;quot; in the dice example.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; A \backslash B &amp;lt;/math&amp;gt; represents &#039;&#039;difference&#039;&#039;, that is, &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; &#039;&#039;but not&#039;&#039; &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt;.  For example, we may be interested in the event of drawing the queen of spades from a deck of cards.  This can be expressed as the event of drawing a queen, but not drawing a queen of hearts, diamonds or clubs.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\varnothing&amp;lt;/math&amp;gt; or &amp;lt;math&amp;gt;\{\}&amp;lt;/math&amp;gt; represent an &#039;&#039;impossible event&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt; represents a &#039;&#039;certain event&#039;&#039; &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; are called &#039;&#039;disjoint events&#039;&#039; if &amp;lt;math&amp;gt;A\cap B = \varnothing&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Probability ==&lt;br /&gt;
Now that we know what events are, we should think a bit about a way to express the likelihood of an event occuring.  The classical definition of probability comes from the following.  If we can perform our experiment over and over in a way that is repeatable, we can count the number of times that the experiment gives rise to event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  We also keep track of the number of times that we perform the same experiment.  If we repeat the experiment a large enough number of times, we can express the probability of event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; as follows:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A) = \frac{N_{A}}{N} &amp;lt;/math&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;N_{A}&amp;lt;/math&amp;gt; is the number of times event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; occurred, and &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; is the number of times the experiment was repeated.  As &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; approaches infinity, the fraction above approaches the true probability of the event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  The value of &amp;lt;math&amp;gt;P(A)&amp;lt;/math&amp;gt; is clearly between 0 and 1.  If our event is the &#039;&#039;certain event&#039;&#039; &amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt;, then for each time we perform the experiment, the event &amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt; is observed; &amp;lt;math&amp;gt;N_{\Omega} = N&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;P(\Omega)=1&amp;lt;/math&amp;gt;.  If our event is the &#039;&#039;impossible event&#039;&#039; &amp;lt;math&amp;gt;\varnothing&amp;lt;/math&amp;gt;, we know &amp;lt;math&amp;gt;N_{\varnothing}=0&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; P(\varnothing) = 0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; are &#039;&#039;disjoint events&#039;&#039;, then whenever event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; is observed, then it is impossible for event &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; to be observed simultaneously.  Then&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;N(A\cup B) = N(A) + N(B)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Given our definition of probability, we can arrive at the following:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A\cup B) = P(A) + P(B)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At this point it&#039;s worth remembering that all events are not disjoint events.  I was originally confused by events and outcomes, and this was the source of many misunderstandings.  For events that are not disjoint, we end up with the following probability definition.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; P(A\cup B) = P(A) + P(B) - P(A\cap B)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
How can we see this from example?  Well, let&#039;s consider drawing from a deck of cards.  I&#039;ll define two &#039;&#039;events&#039;&#039;: &amp;quot;drawing a Queen&amp;quot;, and &amp;quot;drawing a Spade&amp;quot;.  We can tell off the bat that these are not disjoint events, because you can draw a queen that is also a spade.  There are four queens in the deck, so if we perform the experiment of drawing a card, putting it back in the deck and shuffling (what statisticians refer to as &#039;&#039;sampling with replacement&#039;&#039;, we will end up with a probability of &amp;lt;math&amp;gt;\frac{1}{13}&amp;lt;/math&amp;gt; for a queen draw.  By the same argument, we obtain a probability for drawing a spade as &amp;lt;math&amp;gt;\frac{1}{4}&amp;lt;/math&amp;gt;.  The expression &amp;lt;math&amp;gt;P(A\cup B)&amp;lt;/math&amp;gt; here can be translated as &amp;quot;the chance of drawing a queen or a spade&amp;quot;.  If we assume naively (as I used to) that for this case &amp;lt;math&amp;gt;P(A\cup B) = P(A) + P(B)&amp;lt;/math&amp;gt;, we can simply add our probabilities together for &amp;quot;the chance of drawing a queen or a spade&amp;quot; as &amp;lt;math&amp;gt;\frac{1}{13}+\frac{1}{4}&amp;lt;/math&amp;gt;.  If we were to gather some data experimentally, we would find that our results would differ from the prediction -- the probability observed would be slightly less than &amp;lt;math&amp;gt;\frac{1}{13}+\frac{1}{4}&amp;lt;/math&amp;gt;.  Why?  Because we&#039;re counting the queen of spades twice in our expression, once as a spade, and again as a queen.  We need to count it only once, as it can only be drawn with probability of &amp;lt;math&amp;gt;\frac{1}{52}&amp;lt;/math&amp;gt;.  [[Still confused?]] &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Proof:&#039;&#039;&#039; If &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; are not disjoint, we have to avoid the double counting problem by exactly specifying their union.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;A \cup B = A \cup (B \backslash A) &amp;lt;/math&amp;gt; so &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A \cup B) = P(A \cup (B \backslash A)) &amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B \backslash A&amp;lt;/math&amp;gt; are disjoint sets.  We can then use the definition of disjoint events from above to express our desired result:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A \cup B) = P(A) + P(B \backslash A)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
We also know that&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(B \backslash A) = P(B) - P(B\cap A)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
so&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; P(A \cup B) = P(A) + P(B) - P(B\cap A)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Whew!  Our first proof.  I hope that wasn&#039;t too too dry.&lt;/div&gt;</summary>
		<author><name>69.118.80.7</name></author>
	</entry>
	<entry>
		<id>https://ideawaza.com/index.php?title=Introduction_to_Statistics&amp;diff=17035</id>
		<title>Introduction to Statistics</title>
		<link rel="alternate" type="text/html" href="https://ideawaza.com/index.php?title=Introduction_to_Statistics&amp;diff=17035"/>
		<updated>2005-06-29T14:56:48Z</updated>

		<summary type="html">&lt;p&gt;69.118.80.7: /* Experiments, Outcomes and Events */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Preamble ==&lt;br /&gt;
Probability and statistics is the most boring thing imaginable.  It&#039;s dull, unlike fancy math -- if you&#039;re ever at a cocktail party and want to impress someone, it&#039;s a lot easier to say you&#039;re a mathematician than to say you&#039;re a statistician.  It&#039;s also pretty abstract.  Most thorough explorations of the discipline are in very dry books that are short on examples.  If fact, if you&#039;re here it&#039;s probably because you&#039;re taking a stats class somewhere and your book and lecturer totally suck.  &lt;br /&gt;
&lt;br /&gt;
This aside, statistics is a central topic in modern life, and understanding just a little bit about it will help you a lot regardless of what you do or end up doing.  I hope this web site doesn&#039;t suck.  If it does, please leave comments on the discussion tab above.&lt;br /&gt;
&lt;br /&gt;
== Experiments, Outcomes and Events ==&lt;br /&gt;
&lt;br /&gt;
The easiest way to think of probability is in terms of experiments and their potential outcomes.  Many examples can be drawn from everyday experience:  On the drive home from work, you can encounter a flat tire, or have an uneventful drive; the outcome of an election can include either a win by candidate A, B, or C, or a runoff.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Definition:&#039;&#039;&#039; The entire collection of possible outcomes from an experiment is termed the &#039;&#039;sample space&#039;&#039;, indicated as &#039;&#039;&#039;&amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The simplest (albeit uninteresting) example would be an experiment with only one possible outcome, say &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  If we remember our set theory from elementary school, we can express the sample space as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega = \{ A \} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A more interesting example is the result of rolling a six sided dice.  The sample space for this experiment is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega = \{ 1,2,3,4,5,6 \}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We may be interested in &#039;&#039;events&#039;&#039; in an experiment.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Definition:&#039;&#039;&#039; An &#039;&#039;event&#039;&#039; is some subset of outcomes from the &#039;&#039;sample space&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In the dice example, events of interest might include&amp;lt;br&amp;gt;&lt;br /&gt;
a) the outcome is an even number&amp;lt;br&amp;gt;&lt;br /&gt;
b) the outcome is less than three&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These events can be expressed in terms of the possible outcomes from the experiment: &amp;lt;br&amp;gt;&lt;br /&gt;
a) : &amp;lt;math&amp;gt; \{2,4,6\} &amp;lt;/math&amp;gt; b) : &amp;lt;math&amp;gt; \{ 1,2 \}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can borrow definitions from set theory to express events in terms of outcomes.  Here is a refresher of some terminology, and some new terms that will be important later: &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \cup &amp;lt;/math&amp;gt; represents the Union of two events&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:[http://en.wikipedia.org/wiki/Image:Venn_A_union_B.png]]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \cap &amp;lt;/math&amp;gt; represents the Interection of two events&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:[http://en.wikipedia.org/wiki/Image:Venn_A_intersect_B.png]]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\{\cdots\}^{c}&amp;lt;/math&amp;gt; represents the complement of an event.  For instance, &amp;quot;the outcome is an even number&amp;quot; is the complement of &amp;quot;the outcome is an odd number&amp;quot; in the dice example.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; A \backslash B &amp;lt;/math&amp;gt; represents &#039;&#039;difference&#039;&#039;, that is, &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; &#039;&#039;but not&#039;&#039; &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt;.  For example, we may be interested in the event of drawing the queen of spades from a deck of cards.  This can be expressed as the event of drawing a queen, but not drawing a queen of hearts, diamonds or clubs.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\varnothing&amp;lt;/math&amp;gt; or &amp;lt;math&amp;gt;\{\}&amp;lt;/math&amp;gt; represent an &#039;&#039;impossible event&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt; represents a &#039;&#039;certain event&#039;&#039; &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; are called &#039;&#039;disjoint events&#039;&#039; if &amp;lt;math&amp;gt;A\cap B = \varnothing&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Probability ==&lt;br /&gt;
Now that we know what events are, we should think a bit about a way to express the likelihood of an event occuring.  The classical definition of probability comes from the following.  If we can perform our experiment over and over in a way that is repeatable, we can count the number of times that the experiment gives rise to event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  We also keep track of the number of times that we perform the same experiment.  If we repeat the experiment a large enough number of times, we can express the probability of event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; as follows:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A) = \frac{N_{A}}{N} &amp;lt;/math&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;N_{A}&amp;lt;/math&amp;gt; is the number of times event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; occurred, and &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; is the number of times the experiment was repeated.  As &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; approaches infinity, the fraction above approaches the true probability of the event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  The value of &amp;lt;math&amp;gt;P(A)&amp;lt;/math&amp;gt; is clearly between 0 and 1.  If our event is the &#039;&#039;certain event&#039;&#039; &amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt;, then for each time we perform the experiment, the event &amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt; is observed; &amp;lt;math&amp;gt;N_{\Omega} = N&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;P(\Omega)=1&amp;lt;/math&amp;gt;.  If our event is the &#039;&#039;impossible event&#039;&#039; &amp;lt;math&amp;gt;\varnothing&amp;lt;/math&amp;gt;, we know &amp;lt;math&amp;gt;N_{\varnothing}=0&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; P(\varnothing) = 0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; are &#039;&#039;disjoint events&#039;&#039;, then whenever event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; is observed, then it is impossible for event &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; to be observed simultaneously.  Then&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;N(A\cup B) = N(A) + N(B)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Given our definition of probability, we can arrive at the following:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A\cup B) = P(A) + P(B)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At this point it&#039;s worth remembering that all events are not disjoint events.  I was originally confused by events and outcomes, and this was the source of many misunderstandings.  For events that are not disjoint, we end up with the following probability definition.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; P(A\cup B) = P(A) + P(B) - P(A\cap B)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
How can we see this from example?  Well, let&#039;s consider drawing from a deck of cards.  I&#039;ll define two &#039;&#039;events&#039;&#039;: &amp;quot;drawing a Queen&amp;quot;, and &amp;quot;drawing a Spade&amp;quot;.  We can tell off the bat that these are not disjoint events, because you can draw a queen that is also a spade.  There are four queens in the deck, so if we perform the experiment of drawing a card, putting it back in the deck and shuffling (what statisticians refer to as &#039;&#039;sampling with replacement&#039;&#039;, we will end up with a probability of &amp;lt;math&amp;gt;\frac{1}{13}&amp;lt;/math&amp;gt; for a queen draw.  By the same argument, we obtain a probability for drawing a spade as &amp;lt;math&amp;gt;\frac{1}{4}&amp;lt;/math&amp;gt;.  The expression &amp;lt;math&amp;gt;P(A\cup B)&amp;lt;/math&amp;gt; here can be translated as &amp;quot;the chance of drawing a queen or a spade&amp;quot;.  If we assume naively (as I used to) that for this case &amp;lt;math&amp;gt;P(A\cup B) = P(A) + P(B)&amp;lt;/math&amp;gt;, we can simply add our probabilities together for &amp;quot;the chance of drawing a queen or a spade&amp;quot; as &amp;lt;math&amp;gt;\frac{1}{13}+\frac{1}{4}&amp;lt;/math&amp;gt;.  If we were to gather some data experimentally, we would find that our results would differ from the prediction -- the probability observed would be slightly less than &amp;lt;math&amp;gt;\frac{1}{13}+\frac{1}{4}&amp;lt;/math&amp;gt;.  Why?  Because we&#039;re counting the queen of spades twice in our expression, once as a spade, and again as a queen.  We need to count it only once, as it can only be drawn with probability of &amp;lt;math&amp;gt;\frac{1}{52}&amp;lt;/math&amp;gt;.  [[Still confused?]] &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Proof:&#039;&#039;&#039; If &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; are not disjoint, we have to avoid the double counting problem by exactly specifying their union.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;A \cup B = A \cup (B \backslash A) &amp;lt;/math&amp;gt; so &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A \cup B) = P(A \cup (B \backslash A)) &amp;lt;/math&amp;gt;&lt;/div&gt;</summary>
		<author><name>69.118.80.7</name></author>
	</entry>
	<entry>
		<id>https://ideawaza.com/index.php?title=Introduction_to_Statistics&amp;diff=17034</id>
		<title>Introduction to Statistics</title>
		<link rel="alternate" type="text/html" href="https://ideawaza.com/index.php?title=Introduction_to_Statistics&amp;diff=17034"/>
		<updated>2005-06-29T14:51:11Z</updated>

		<summary type="html">&lt;p&gt;69.118.80.7: /* Experiments, Outcomes and Events */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Preamble ==&lt;br /&gt;
Probability and statistics is the most boring thing imaginable.  It&#039;s dull, unlike fancy math -- if you&#039;re ever at a cocktail party and want to impress someone, it&#039;s a lot easier to say you&#039;re a mathematician than to say you&#039;re a statistician.  It&#039;s also pretty abstract.  Most thorough explorations of the discipline are in very dry books that are short on examples.  If fact, if you&#039;re here it&#039;s probably because you&#039;re taking a stats class somewhere and your book and lecturer totally suck.  &lt;br /&gt;
&lt;br /&gt;
This aside, statistics is a central topic in modern life, and understanding just a little bit about it will help you a lot regardless of what you do or end up doing.  I hope this web site doesn&#039;t suck.  If it does, please leave comments on the discussion tab above.&lt;br /&gt;
&lt;br /&gt;
== Experiments, Outcomes and Events ==&lt;br /&gt;
&lt;br /&gt;
The easiest way to think of probability is in terms of experiments and their potential outcomes.  Many examples can be drawn from everyday experience:  On the drive home from work, you can encounter a flat tire, or have an uneventful drive; the outcome of an election can include either a win by candidate A, B, or C, or a runoff.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Definition:&#039;&#039;&#039; The entire collection of possible outcomes from an experiment is termed the &#039;&#039;sample space&#039;&#039;, indicated as &#039;&#039;&#039;&amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The simplest (albeit uninteresting) example would be an experiment with only one possible outcome, say &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  If we remember our set theory from elementary school, we can express the sample space as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega = \{ A \} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A more interesting example is the result of rolling a six sided dice.  The sample space for this experiment is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega = \{ 1,2,3,4,5,6 \}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We may be interested in &#039;&#039;events&#039;&#039; in an experiment.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Definition:&#039;&#039;&#039; An &#039;&#039;event&#039;&#039; is some subset of outcomes from the &#039;&#039;sample space&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In the dice example, events of interest might include&amp;lt;br&amp;gt;&lt;br /&gt;
a) the outcome is an even number&amp;lt;br&amp;gt;&lt;br /&gt;
b) the outcome is less than three&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These events can be expressed in terms of the possible outcomes from the experiment: &amp;lt;br&amp;gt;&lt;br /&gt;
a) : &amp;lt;math&amp;gt; \{2,4,6\} &amp;lt;/math&amp;gt; b) &amp;lt;math&amp;gt; \{ 1,2 \}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can borrow definitions from set theory to express events in terms of outcomes.  Here is a refresher of some terminology, and some new terms that will be important later: &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \cup &amp;lt;/math&amp;gt; represents the Union of two events&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:[http://en.wikipedia.org/wiki/Image:Venn_A_union_B.png]]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \cap &amp;lt;/math&amp;gt; represents the Interection of two events&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:[http://en.wikipedia.org/wiki/Image:Venn_A_intersect_B.png]]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\{\cdots\}^{c}&amp;lt;/math&amp;gt; represents the complement of an event.  For instance, &amp;quot;the outcome is an even number&amp;quot; is the complement of &amp;quot;the outcome is an odd number&amp;quot; in the dice example.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; A \backslash B &amp;lt;/math&amp;gt; represents &#039;&#039;difference&#039;&#039;, that is, &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; &#039;&#039;but not&#039;&#039; &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\varnothing&amp;lt;/math&amp;gt; or &amp;lt;math&amp;gt;\{\}&amp;lt;/math&amp;gt; represent an &#039;&#039;impossible event&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt; represents a &#039;&#039;certain event&#039;&#039; &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; are called &#039;&#039;disjoint events&#039;&#039; if &amp;lt;math&amp;gt;A\cap B = \varnothing&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Probability ==&lt;br /&gt;
Now that we know what events are, we should think a bit about a way to express the likelihood of an event occuring.  The classical definition of probability comes from the following.  If we can perform our experiment over and over in a way that is repeatable, we can count the number of times that the experiment gives rise to event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  We also keep track of the number of times that we perform the same experiment.  If we repeat the experiment a large enough number of times, we can express the probability of event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; as follows:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A) = \frac{N_{A}}{N} &amp;lt;/math&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;N_{A}&amp;lt;/math&amp;gt; is the number of times event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; occurred, and &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; is the number of times the experiment was repeated.  As &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; approaches infinity, the fraction above approaches the true probability of the event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  The value of &amp;lt;math&amp;gt;P(A)&amp;lt;/math&amp;gt; is clearly between 0 and 1.  If our event is the &#039;&#039;certain event&#039;&#039; &amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt;, then for each time we perform the experiment, the event &amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt; is observed; &amp;lt;math&amp;gt;N_{\Omega} = N&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;P(\Omega)=1&amp;lt;/math&amp;gt;.  If our event is the &#039;&#039;impossible event&#039;&#039; &amp;lt;math&amp;gt;\varnothing&amp;lt;/math&amp;gt;, we know &amp;lt;math&amp;gt;N_{\varnothing}=0&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; P(\varnothing) = 0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; are &#039;&#039;disjoint events&#039;&#039;, then whenever event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; is observed, then it is impossible for event &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; to be observed simultaneously.  Then&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;N(A\cup B) = N(A) + N(B)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Given our definition of probability, we can arrive at the following:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A\cup B) = P(A) + P(B)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At this point it&#039;s worth remembering that all events are not disjoint events.  I was originally confused by events and outcomes, and this was the source of many misunderstandings.  For events that are not disjoint, we end up with the following probability definition.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; P(A\cup B) = P(A) + P(B) - P(A\cap B)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
How can we see this from example?  Well, let&#039;s consider drawing from a deck of cards.  I&#039;ll define two &#039;&#039;events&#039;&#039;: &amp;quot;drawing a Queen&amp;quot;, and &amp;quot;drawing a Spade&amp;quot;.  We can tell off the bat that these are not disjoint events, because you can draw a queen that is also a spade.  There are four queens in the deck, so if we perform the experiment of drawing a card, putting it back in the deck and shuffling (what statisticians refer to as &#039;&#039;sampling with replacement&#039;&#039;, we will end up with a probability of &amp;lt;math&amp;gt;\frac{1}{13}&amp;lt;/math&amp;gt; for a queen draw.  By the same argument, we obtain a probability for drawing a spade as &amp;lt;math&amp;gt;\frac{1}{4}&amp;lt;/math&amp;gt;.  The expression &amp;lt;math&amp;gt;P(A\cup B)&amp;lt;/math&amp;gt; here can be translated as &amp;quot;the chance of drawing a queen or a spade&amp;quot;.  If we assume naively (as I used to) that for this case &amp;lt;math&amp;gt;P(A\cup B) = P(A) + P(B)&amp;lt;/math&amp;gt;, we can simply add our probabilities together for &amp;quot;the chance of drawing a queen or a spade&amp;quot; as &amp;lt;math&amp;gt;\frac{1}{13}+\frac{1}{4}&amp;lt;/math&amp;gt;.  If we were to gather some data experimentally, we would find that our results would differ from the prediction -- the probability observed would be slightly less than &amp;lt;math&amp;gt;\frac{1}{13}+\frac{1}{4}&amp;lt;/math&amp;gt;.  Why?  Because we&#039;re counting the queen of spades twice in our expression, once as a spade, and again as a queen.  We need to count it only once, as it can only be drawn with probability of &amp;lt;math&amp;gt;\frac{1}{52}&amp;lt;/math&amp;gt;.  [[Still confused?]] &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Proof:&#039;&#039;&#039; If &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; are not disjoint, we have to avoid the double counting problem by exactly specifying their union.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;A \cup B = A \cup (B \backslash A) &amp;lt;/math&amp;gt; so &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A \cup B) = P(A \cup (B \backslash A)) &amp;lt;/math&amp;gt;&lt;/div&gt;</summary>
		<author><name>69.118.80.7</name></author>
	</entry>
	<entry>
		<id>https://ideawaza.com/index.php?title=Introduction_to_Statistics&amp;diff=17033</id>
		<title>Introduction to Statistics</title>
		<link rel="alternate" type="text/html" href="https://ideawaza.com/index.php?title=Introduction_to_Statistics&amp;diff=17033"/>
		<updated>2005-06-29T14:46:29Z</updated>

		<summary type="html">&lt;p&gt;69.118.80.7: /* Probability */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Preamble ==&lt;br /&gt;
Probability and statistics is the most boring thing imaginable.  It&#039;s dull, unlike fancy math -- if you&#039;re ever at a cocktail party and want to impress someone, it&#039;s a lot easier to say you&#039;re a mathematician than to say you&#039;re a statistician.  It&#039;s also pretty abstract.  Most thorough explorations of the discipline are in very dry books that are short on examples.  If fact, if you&#039;re here it&#039;s probably because you&#039;re taking a stats class somewhere and your book and lecturer totally suck.  &lt;br /&gt;
&lt;br /&gt;
This aside, statistics is a central topic in modern life, and understanding just a little bit about it will help you a lot regardless of what you do or end up doing.  I hope this web site doesn&#039;t suck.  If it does, please leave comments on the discussion tab above.&lt;br /&gt;
&lt;br /&gt;
== Experiments, Outcomes and Events ==&lt;br /&gt;
&lt;br /&gt;
The easiest way to think of probability is in terms of experiments and their potential outcomes.  Many examples can be drawn from everyday experience:  On the drive home from work, you can encounter a flat tire, or have an uneventful drive; the outcome of an election can include either a win by candidate A, B, or C, or a runoff.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Definition:&#039;&#039;&#039; The entire collection of possible outcomes from an experiment is termed the &#039;&#039;sample space&#039;&#039;, indicated as &#039;&#039;&#039;&amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The simplest (albeit uninteresting) example would be an experiment with only one possible outcome, say &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  If we remember our set theory from elementary school, we can expressed the sample space as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega = \{ A \} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A more interesting example is the result of rolling a six sided dice.  The sample space for this experiment is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega = \{ 1,2,3,4,5,6 \}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We may be interested in &#039;&#039;events&#039;&#039; in an experiment.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Definition:&#039;&#039;&#039; An &#039;&#039;event&#039;&#039; is some subset of outcomes from the &#039;&#039;sample space&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In the dice example, events of interest might include&amp;lt;br&amp;gt;&lt;br /&gt;
a) the outcome is an even number&amp;lt;br&amp;gt;&lt;br /&gt;
b) the outcome is less than three&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These events can be expressed in terms of the possible outcomes from the experiment: &amp;lt;br&amp;gt;&lt;br /&gt;
a) : &amp;lt;math&amp;gt; \{2,4,6\} &amp;lt;/math&amp;gt; b) &amp;lt;math&amp;gt; \{ 1,2 \}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can borrow definitions from set theory to express events in terms of outcomes.  Here is a refresher of some terminology, and some new terms that will be important later: &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \cup &amp;lt;/math&amp;gt; represents the Union of two events&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:[http://en.wikipedia.org/wiki/Image:Venn_A_union_B.png]]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \cap &amp;lt;/math&amp;gt; represents the Interection of two events&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:[http://en.wikipedia.org/wiki/Image:Venn_A_intersect_B.png]]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\{\cdots\}^{c}&amp;lt;/math&amp;gt; represents the complement of an event.  For instance, &amp;quot;the outcome is an even number&amp;quot; is the complement of &amp;quot;the outcome is an odd number&amp;quot; in the dice example.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; A \backslash B &amp;lt;/math&amp;gt; represents &#039;&#039;difference&#039;&#039;, that is, &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; &#039;&#039;but not&#039;&#039; &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\varnothing&amp;lt;/math&amp;gt; or &amp;lt;math&amp;gt;\{\}&amp;lt;/math&amp;gt; represent an &#039;&#039;impossible event&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt; represents a &#039;&#039;certain event&#039;&#039; &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; are called &#039;&#039;disjoint events&#039;&#039; if &amp;lt;math&amp;gt;A\cap B = \varnothing&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Probability ==&lt;br /&gt;
Now that we know what events are, we should think a bit about a way to express the likelihood of an event occuring.  The classical definition of probability comes from the following.  If we can perform our experiment over and over in a way that is repeatable, we can count the number of times that the experiment gives rise to event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  We also keep track of the number of times that we perform the same experiment.  If we repeat the experiment a large enough number of times, we can express the probability of event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; as follows:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A) = \frac{N_{A}}{N} &amp;lt;/math&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;N_{A}&amp;lt;/math&amp;gt; is the number of times event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; occurred, and &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; is the number of times the experiment was repeated.  As &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; approaches infinity, the fraction above approaches the true probability of the event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  The value of &amp;lt;math&amp;gt;P(A)&amp;lt;/math&amp;gt; is clearly between 0 and 1.  If our event is the &#039;&#039;certain event&#039;&#039; &amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt;, then for each time we perform the experiment, the event &amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt; is observed; &amp;lt;math&amp;gt;N_{\Omega} = N&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;P(\Omega)=1&amp;lt;/math&amp;gt;.  If our event is the &#039;&#039;impossible event&#039;&#039; &amp;lt;math&amp;gt;\varnothing&amp;lt;/math&amp;gt;, we know &amp;lt;math&amp;gt;N_{\varnothing}=0&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; P(\varnothing) = 0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; are &#039;&#039;disjoint events&#039;&#039;, then whenever event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; is observed, then it is impossible for event &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; to be observed simultaneously.  Then&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;N(A\cup B) = N(A) + N(B)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Given our definition of probability, we can arrive at the following:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A\cup B) = P(A) + P(B)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At this point it&#039;s worth remembering that all events are not disjoint events.  I was originally confused by events and outcomes, and this was the source of many misunderstandings.  For events that are not disjoint, we end up with the following probability definition.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; P(A\cup B) = P(A) + P(B) - P(A\cap B)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
How can we see this from example?  Well, let&#039;s consider drawing from a deck of cards.  I&#039;ll define two &#039;&#039;events&#039;&#039;: &amp;quot;drawing a Queen&amp;quot;, and &amp;quot;drawing a Spade&amp;quot;.  We can tell off the bat that these are not disjoint events, because you can draw a queen that is also a spade.  There are four queens in the deck, so if we perform the experiment of drawing a card, putting it back in the deck and shuffling (what statisticians refer to as &#039;&#039;sampling with replacement&#039;&#039;, we will end up with a probability of &amp;lt;math&amp;gt;\frac{1}{13}&amp;lt;/math&amp;gt; for a queen draw.  By the same argument, we obtain a probability for drawing a spade as &amp;lt;math&amp;gt;\frac{1}{4}&amp;lt;/math&amp;gt;.  The expression &amp;lt;math&amp;gt;P(A\cup B)&amp;lt;/math&amp;gt; here can be translated as &amp;quot;the chance of drawing a queen or a spade&amp;quot;.  If we assume naively (as I used to) that for this case &amp;lt;math&amp;gt;P(A\cup B) = P(A) + P(B)&amp;lt;/math&amp;gt;, we can simply add our probabilities together for &amp;quot;the chance of drawing a queen or a spade&amp;quot; as &amp;lt;math&amp;gt;\frac{1}{13}+\frac{1}{4}&amp;lt;/math&amp;gt;.  If we were to gather some data experimentally, we would find that our results would differ from the prediction -- the probability observed would be slightly less than &amp;lt;math&amp;gt;\frac{1}{13}+\frac{1}{4}&amp;lt;/math&amp;gt;.  Why?  Because we&#039;re counting the queen of spades twice in our expression, once as a spade, and again as a queen.  We need to count it only once, as it can only be drawn with probability of &amp;lt;math&amp;gt;\frac{1}{52}&amp;lt;/math&amp;gt;.  [[Still confused?]] &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Proof:&#039;&#039;&#039; If &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; are not disjoint, we have to avoid the double counting problem by exactly specifying their union.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;A \cup B = A \cup (B \backslash A) &amp;lt;/math&amp;gt; so &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A \cup B) = P(A \cup (B \backslash A)) &amp;lt;/math&amp;gt;&lt;/div&gt;</summary>
		<author><name>69.118.80.7</name></author>
	</entry>
	<entry>
		<id>https://ideawaza.com/index.php?title=Introduction_to_Statistics&amp;diff=17032</id>
		<title>Introduction to Statistics</title>
		<link rel="alternate" type="text/html" href="https://ideawaza.com/index.php?title=Introduction_to_Statistics&amp;diff=17032"/>
		<updated>2005-06-29T14:36:29Z</updated>

		<summary type="html">&lt;p&gt;69.118.80.7: /* Experiments, Outcomes and Events */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Preamble ==&lt;br /&gt;
Probability and statistics is the most boring thing imaginable.  It&#039;s dull, unlike fancy math -- if you&#039;re ever at a cocktail party and want to impress someone, it&#039;s a lot easier to say you&#039;re a mathematician than to say you&#039;re a statistician.  It&#039;s also pretty abstract.  Most thorough explorations of the discipline are in very dry books that are short on examples.  If fact, if you&#039;re here it&#039;s probably because you&#039;re taking a stats class somewhere and your book and lecturer totally suck.  &lt;br /&gt;
&lt;br /&gt;
This aside, statistics is a central topic in modern life, and understanding just a little bit about it will help you a lot regardless of what you do or end up doing.  I hope this web site doesn&#039;t suck.  If it does, please leave comments on the discussion tab above.&lt;br /&gt;
&lt;br /&gt;
== Experiments, Outcomes and Events ==&lt;br /&gt;
&lt;br /&gt;
The easiest way to think of probability is in terms of experiments and their potential outcomes.  Many examples can be drawn from everyday experience:  On the drive home from work, you can encounter a flat tire, or have an uneventful drive; the outcome of an election can include either a win by candidate A, B, or C, or a runoff.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Definition:&#039;&#039;&#039; The entire collection of possible outcomes from an experiment is termed the &#039;&#039;sample space&#039;&#039;, indicated as &#039;&#039;&#039;&amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The simplest (albeit uninteresting) example would be an experiment with only one possible outcome, say &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  If we remember our set theory from elementary school, we can expressed the sample space as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega = \{ A \} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A more interesting example is the result of rolling a six sided dice.  The sample space for this experiment is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega = \{ 1,2,3,4,5,6 \}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We may be interested in &#039;&#039;events&#039;&#039; in an experiment.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Definition:&#039;&#039;&#039; An &#039;&#039;event&#039;&#039; is some subset of outcomes from the &#039;&#039;sample space&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In the dice example, events of interest might include&amp;lt;br&amp;gt;&lt;br /&gt;
a) the outcome is an even number&amp;lt;br&amp;gt;&lt;br /&gt;
b) the outcome is less than three&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These events can be expressed in terms of the possible outcomes from the experiment: &amp;lt;br&amp;gt;&lt;br /&gt;
a) : &amp;lt;math&amp;gt; \{2,4,6\} &amp;lt;/math&amp;gt; b) &amp;lt;math&amp;gt; \{ 1,2 \}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can borrow definitions from set theory to express events in terms of outcomes.  Here is a refresher of some terminology, and some new terms that will be important later: &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \cup &amp;lt;/math&amp;gt; represents the Union of two events&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:[http://en.wikipedia.org/wiki/Image:Venn_A_union_B.png]]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \cap &amp;lt;/math&amp;gt; represents the Interection of two events&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:[http://en.wikipedia.org/wiki/Image:Venn_A_intersect_B.png]]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\{\cdots\}^{c}&amp;lt;/math&amp;gt; represents the complement of an event.  For instance, &amp;quot;the outcome is an even number&amp;quot; is the complement of &amp;quot;the outcome is an odd number&amp;quot; in the dice example.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; A \backslash B &amp;lt;/math&amp;gt; represents &#039;&#039;difference&#039;&#039;, that is, &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; &#039;&#039;but not&#039;&#039; &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\varnothing&amp;lt;/math&amp;gt; or &amp;lt;math&amp;gt;\{\}&amp;lt;/math&amp;gt; represent an &#039;&#039;impossible event&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt; represents a &#039;&#039;certain event&#039;&#039; &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; are called &#039;&#039;disjoint events&#039;&#039; if &amp;lt;math&amp;gt;A\cap B = \varnothing&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Probability ==&lt;br /&gt;
Now that we know what events are, we should think a bit about a way to express the likelihood of an event occuring.  The classical definition of probability comes from the following.  If we can perform our experiment over and over in a way that is repeatable, we can count the number of times that the experiment gives rise to event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  We also keep track of the number of times that we perform the same experiment.  If we repeat the experiment a large enough number of times, we can express the probability of event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; as follows:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A) = \frac{N_{A}}{N} &amp;lt;/math&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;N_{A}&amp;lt;/math&amp;gt; is the number of times event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; occurred, and &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; is the number of times the experiment was repeated.  As &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; approaches infinity, the fraction above approaches the true probability of the event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  The value of &amp;lt;math&amp;gt;P(A)&amp;lt;/math&amp;gt; is clearly between 0 and 1.  If our event is the &#039;&#039;certain event&#039;&#039; &amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt;, then for each time we perform the experiment, the event &amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt; is observed; &amp;lt;math&amp;gt;N_{\Omega} = N&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;P(\Omega)=1&amp;lt;/math&amp;gt;.  If our event is the &#039;&#039;impossible event&#039;&#039; &amp;lt;math&amp;gt;\varnothing&amp;lt;/math&amp;gt;, we know &amp;lt;math&amp;gt;N_{\varnothing}=0&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; P(\varnothing) = 0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; are &#039;&#039;disjoint events&#039;&#039;, then whenever event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; is observed, then it is impossible for event &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; to be observed simultaneously.  Then&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;N(A\cup B) = N(A) + N(B)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Given our definition of probability, we can arrive at the following:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A\cup B) = P(A) + P(B)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At this point it&#039;s worth remembering that all events are not disjoint events.  I was originally confused by events and outcomes, and this was the source of many misunderstandings.  For events that are not disjoint, we end up with the following probability definition.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; P(A\cup B) = P(A) + P(B) - P(A\cap B)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
How can we see this from example?  Well, let&#039;s consider drawing from a deck of cards.  I&#039;ll define two &#039;&#039;events&#039;&#039;: &amp;quot;drawing a Queen&amp;quot;, and &amp;quot;drawing a Spade&amp;quot;.  We can tell off the bat that these are not disjoint events, because you can draw a queen that is also a spade.  There are four queens in the deck, so if we perform the experiment of drawing a card, putting it back in the deck and shuffling (what statisticians refer to as &#039;&#039;sampling with replacement&#039;&#039;, we will end up with a probability of &amp;lt;math&amp;gt;\frac{1}{13}&amp;lt;/math&amp;gt; for a queen draw.  By the same argument, we obtain a probability for drawing a spade as &amp;lt;math&amp;gt;\frac{1}{4}&amp;lt;/math&amp;gt;.  The expression &amp;lt;math&amp;gt;P(A\cup B)&amp;lt;/math&amp;gt; here can be translated as &amp;quot;the chance of drawing a queen or a spade&amp;quot;.  If we assume naively (as I used to) that for this case &amp;lt;math&amp;gt;P(A\cup B) = P(A) + P(B)&amp;lt;/math&amp;gt;, we can simply add our probabilities together for &amp;quot;the chance of drawing a queen or a spade&amp;quot; as &amp;lt;math&amp;gt;\frac{1}{13}+\frac{1}{4}&amp;lt;/math&amp;gt;.  If we were to gather some data experimentally, we would find that our results would differ from the prediction -- the probability observed would be slightly less than &amp;lt;math&amp;gt;\frac{1}{13}+\frac{1}{4}&amp;lt;/math&amp;gt;.  Why?  Because we&#039;re counting the queen of spades twice in our expression, once as a spade, and again as a queen.  We need to count it only once, as it can only be drawn with probability of &amp;lt;math&amp;gt;\frac{1}{52}&amp;lt;/math&amp;gt;.  [[Still confused?]] &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Proof:&#039;&#039;&#039;&lt;/div&gt;</summary>
		<author><name>69.118.80.7</name></author>
	</entry>
	<entry>
		<id>https://ideawaza.com/index.php?title=Introduction_to_Statistics&amp;diff=17031</id>
		<title>Introduction to Statistics</title>
		<link rel="alternate" type="text/html" href="https://ideawaza.com/index.php?title=Introduction_to_Statistics&amp;diff=17031"/>
		<updated>2005-06-29T14:33:41Z</updated>

		<summary type="html">&lt;p&gt;69.118.80.7: /* Probability */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Preamble ==&lt;br /&gt;
Probability and statistics is the most boring thing imaginable.  It&#039;s dull, unlike fancy math -- if you&#039;re ever at a cocktail party and want to impress someone, it&#039;s a lot easier to say you&#039;re a mathematician than to say you&#039;re a statistician.  It&#039;s also pretty abstract.  Most thorough explorations of the discipline are in very dry books that are short on examples.  If fact, if you&#039;re here it&#039;s probably because you&#039;re taking a stats class somewhere and your book and lecturer totally suck.  &lt;br /&gt;
&lt;br /&gt;
This aside, statistics is a central topic in modern life, and understanding just a little bit about it will help you a lot regardless of what you do or end up doing.  I hope this web site doesn&#039;t suck.  If it does, please leave comments on the discussion tab above.&lt;br /&gt;
&lt;br /&gt;
== Experiments, Outcomes and Events ==&lt;br /&gt;
&lt;br /&gt;
The easiest way to think of probability is in terms of experiments and their potential outcomes.  Many examples can be drawn from everyday experience:  On the drive home from work, you can encounter a flat tire, or have an uneventful drive; the outcome of an election can include either a win by candidate A, B, or C, or a runoff.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Definition:&#039;&#039;&#039; The entire collection of possible outcomes from an experiment is termed the &#039;&#039;sample space&#039;&#039;, indicated as &#039;&#039;&#039;&amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The simplest (albeit uninteresting) example would be an experiment with only one possible outcome, say &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  If we remember our set theory from elementary school, we can expressed the sample space as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega = \{ A \} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A more interesting example is the result of rolling a six sided dice.  The sample space for this experiment is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega = \{ 1,2,3,4,5,6 \}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We may be interested in &#039;&#039;events&#039;&#039; in an experiment.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Definition:&#039;&#039;&#039; An &#039;&#039;event&#039;&#039; is some subset of outcomes from the &#039;&#039;sample space&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In the dice example, events of interest might include&amp;lt;br&amp;gt;&lt;br /&gt;
a) the outcome is an even number&amp;lt;br&amp;gt;&lt;br /&gt;
b) the outcome is less than three&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These events can be expressed in terms of the possible outcomes from the experiment: &amp;lt;br&amp;gt;&lt;br /&gt;
a) : &amp;lt;math&amp;gt; \{2,4,6\} &amp;lt;/math&amp;gt; b) &amp;lt;math&amp;gt; \{ 1,2 \}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can borrow definitions from set theory to express events in terms of outcomes.  Here is a refresher of some terminology, and some new terms that will be important later: &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \cup &amp;lt;/math&amp;gt; represents the Union of two events&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:[http://en.wikipedia.org/wiki/Image:Venn_A_union_B.png]]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \cap &amp;lt;/math&amp;gt; represents the Interection of two events&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:[http://en.wikipedia.org/wiki/Image:Venn_A_intersect_B.png]]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\{\cdots\}^{c}&amp;lt;/math&amp;gt; represents the complement of an event.  For instance, &amp;quot;the outcome is an even number&amp;quot; is the complement of &amp;quot;the outcome is an odd number&amp;quot; in the dice example.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\varnothing&amp;lt;/math&amp;gt; or &amp;lt;math&amp;gt;\{\}&amp;lt;/math&amp;gt; represent an &#039;&#039;impossible event&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt; represents a &#039;&#039;certain event&#039;&#039; &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; are called &#039;&#039;disjoint events&#039;&#039; if &amp;lt;math&amp;gt;A\cap B = \varnothing&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Probability ==&lt;br /&gt;
Now that we know what events are, we should think a bit about a way to express the likelihood of an event occuring.  The classical definition of probability comes from the following.  If we can perform our experiment over and over in a way that is repeatable, we can count the number of times that the experiment gives rise to event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  We also keep track of the number of times that we perform the same experiment.  If we repeat the experiment a large enough number of times, we can express the probability of event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; as follows:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A) = \frac{N_{A}}{N} &amp;lt;/math&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;N_{A}&amp;lt;/math&amp;gt; is the number of times event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; occurred, and &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; is the number of times the experiment was repeated.  As &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; approaches infinity, the fraction above approaches the true probability of the event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  The value of &amp;lt;math&amp;gt;P(A)&amp;lt;/math&amp;gt; is clearly between 0 and 1.  If our event is the &#039;&#039;certain event&#039;&#039; &amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt;, then for each time we perform the experiment, the event &amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt; is observed; &amp;lt;math&amp;gt;N_{\Omega} = N&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;P(\Omega)=1&amp;lt;/math&amp;gt;.  If our event is the &#039;&#039;impossible event&#039;&#039; &amp;lt;math&amp;gt;\varnothing&amp;lt;/math&amp;gt;, we know &amp;lt;math&amp;gt;N_{\varnothing}=0&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; P(\varnothing) = 0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; are &#039;&#039;disjoint events&#039;&#039;, then whenever event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; is observed, then it is impossible for event &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; to be observed simultaneously.  Then&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;N(A\cup B) = N(A) + N(B)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Given our definition of probability, we can arrive at the following:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A\cup B) = P(A) + P(B)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At this point it&#039;s worth remembering that all events are not disjoint events.  I was originally confused by events and outcomes, and this was the source of many misunderstandings.  For events that are not disjoint, we end up with the following probability definition.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; P(A\cup B) = P(A) + P(B) - P(A\cap B)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
How can we see this from example?  Well, let&#039;s consider drawing from a deck of cards.  I&#039;ll define two &#039;&#039;events&#039;&#039;: &amp;quot;drawing a Queen&amp;quot;, and &amp;quot;drawing a Spade&amp;quot;.  We can tell off the bat that these are not disjoint events, because you can draw a queen that is also a spade.  There are four queens in the deck, so if we perform the experiment of drawing a card, putting it back in the deck and shuffling (what statisticians refer to as &#039;&#039;sampling with replacement&#039;&#039;, we will end up with a probability of &amp;lt;math&amp;gt;\frac{1}{13}&amp;lt;/math&amp;gt; for a queen draw.  By the same argument, we obtain a probability for drawing a spade as &amp;lt;math&amp;gt;\frac{1}{4}&amp;lt;/math&amp;gt;.  The expression &amp;lt;math&amp;gt;P(A\cup B)&amp;lt;/math&amp;gt; here can be translated as &amp;quot;the chance of drawing a queen or a spade&amp;quot;.  If we assume naively (as I used to) that for this case &amp;lt;math&amp;gt;P(A\cup B) = P(A) + P(B)&amp;lt;/math&amp;gt;, we can simply add our probabilities together for &amp;quot;the chance of drawing a queen or a spade&amp;quot; as &amp;lt;math&amp;gt;\frac{1}{13}+\frac{1}{4}&amp;lt;/math&amp;gt;.  If we were to gather some data experimentally, we would find that our results would differ from the prediction -- the probability observed would be slightly less than &amp;lt;math&amp;gt;\frac{1}{13}+\frac{1}{4}&amp;lt;/math&amp;gt;.  Why?  Because we&#039;re counting the queen of spades twice in our expression, once as a spade, and again as a queen.  We need to count it only once, as it can only be drawn with probability of &amp;lt;math&amp;gt;\frac{1}{52}&amp;lt;/math&amp;gt;.  [[Still confused?]] &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Proof:&#039;&#039;&#039;&lt;/div&gt;</summary>
		<author><name>69.118.80.7</name></author>
	</entry>
	<entry>
		<id>https://ideawaza.com/index.php?title=Introduction_to_Statistics&amp;diff=17030</id>
		<title>Introduction to Statistics</title>
		<link rel="alternate" type="text/html" href="https://ideawaza.com/index.php?title=Introduction_to_Statistics&amp;diff=17030"/>
		<updated>2005-06-28T21:39:40Z</updated>

		<summary type="html">&lt;p&gt;69.118.80.7: /* Probability */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Preamble ==&lt;br /&gt;
Probability and statistics is the most boring thing imaginable.  It&#039;s dull, unlike fancy math -- if you&#039;re ever at a cocktail party and want to impress someone, it&#039;s a lot easier to say you&#039;re a mathematician than to say you&#039;re a statistician.  It&#039;s also pretty abstract.  Most thorough explorations of the discipline are in very dry books that are short on examples.  If fact, if you&#039;re here it&#039;s probably because you&#039;re taking a stats class somewhere and your book and lecturer totally suck.  &lt;br /&gt;
&lt;br /&gt;
This aside, statistics is a central topic in modern life, and understanding just a little bit about it will help you a lot regardless of what you do or end up doing.  I hope this web site doesn&#039;t suck.  If it does, please leave comments on the discussion tab above.&lt;br /&gt;
&lt;br /&gt;
== Experiments, Outcomes and Events ==&lt;br /&gt;
&lt;br /&gt;
The easiest way to think of probability is in terms of experiments and their potential outcomes.  Many examples can be drawn from everyday experience:  On the drive home from work, you can encounter a flat tire, or have an uneventful drive; the outcome of an election can include either a win by candidate A, B, or C, or a runoff.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Definition:&#039;&#039;&#039; The entire collection of possible outcomes from an experiment is termed the &#039;&#039;sample space&#039;&#039;, indicated as &#039;&#039;&#039;&amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The simplest (albeit uninteresting) example would be an experiment with only one possible outcome, say &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  If we remember our set theory from elementary school, we can expressed the sample space as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega = \{ A \} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A more interesting example is the result of rolling a six sided dice.  The sample space for this experiment is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega = \{ 1,2,3,4,5,6 \}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We may be interested in &#039;&#039;events&#039;&#039; in an experiment.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Definition:&#039;&#039;&#039; An &#039;&#039;event&#039;&#039; is some subset of outcomes from the &#039;&#039;sample space&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In the dice example, events of interest might include&amp;lt;br&amp;gt;&lt;br /&gt;
a) the outcome is an even number&amp;lt;br&amp;gt;&lt;br /&gt;
b) the outcome is less than three&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These events can be expressed in terms of the possible outcomes from the experiment: &amp;lt;br&amp;gt;&lt;br /&gt;
a) : &amp;lt;math&amp;gt; \{2,4,6\} &amp;lt;/math&amp;gt; b) &amp;lt;math&amp;gt; \{ 1,2 \}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can borrow definitions from set theory to express events in terms of outcomes.  Here is a refresher of some terminology, and some new terms that will be important later: &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \cup &amp;lt;/math&amp;gt; represents the Union of two events&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:[http://en.wikipedia.org/wiki/Image:Venn_A_union_B.png]]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \cap &amp;lt;/math&amp;gt; represents the Interection of two events&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:[http://en.wikipedia.org/wiki/Image:Venn_A_intersect_B.png]]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\{\cdots\}^{c}&amp;lt;/math&amp;gt; represents the complement of an event.  For instance, &amp;quot;the outcome is an even number&amp;quot; is the complement of &amp;quot;the outcome is an odd number&amp;quot; in the dice example.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\varnothing&amp;lt;/math&amp;gt; or &amp;lt;math&amp;gt;\{\}&amp;lt;/math&amp;gt; represent an &#039;&#039;impossible event&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt; represents a &#039;&#039;certain event&#039;&#039; &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; are called &#039;&#039;disjoint events&#039;&#039; if &amp;lt;math&amp;gt;A\cap B = \varnothing&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Probability ==&lt;br /&gt;
Now that we know what events are, we should think a bit about a way to express the likelihood of an event occuring.  The classical definition of probability comes from the following.  If we can perform our experiment over and over in a way that is repeatable, we can count the number of times that the experiment gives rise to event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  We also keep track of the number of times that we perform the same experiment.  If we repeat the experiment a large enough number of times, we can express the probability of event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; as follows:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A) = \frac{N_{A}}{N} &amp;lt;/math&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;N_{A}&amp;lt;/math&amp;gt; is the number of times event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; occurred, and &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; is the number of times the experiment was repeated.  As &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; approaches infinity, the fraction above approaches the true probability of the event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  The value of &amp;lt;math&amp;gt;P(A)&amp;lt;/math&amp;gt; is clearly between 0 and 1.  If our event is the &#039;&#039;certain event&#039;&#039; &amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt;, then for each time we perform the experiment, the event &amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt; is observed; &amp;lt;math&amp;gt;N_{\Omega} = N&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;P(\Omega)=1&amp;lt;/math&amp;gt;.  If our event is the &#039;&#039;impossible event&#039;&#039; &amp;lt;math&amp;gt;\varnothing&amp;lt;/math&amp;gt;, we know &amp;lt;math&amp;gt;N_{\varnothing}=0&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; P(\varnothing) = 0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; are &#039;&#039;disjoint events&#039;&#039;, then whenever event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; is observed, then it is impossible for event &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; to be observed simultaneously.  Then&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;N(A\cup B) = N(A) + N(B)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Given our definition of probability, we can arrive at the following:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A\cup B) = P(A) + P(B)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At this point it&#039;s worth remembering that all events are not disjoint events.  I was originally confused by events and outcomes, and this was the source of many misunderstandings.  For events that are not disjoint, we end up with the following probability definition.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; P(A\cup B) = P(A) + P(B) - P(A\cap B)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
How can we see this from example?  Well, let&#039;s consider drawing from a deck of cards.  I&#039;ll define two &#039;&#039;events&#039;&#039;: &amp;quot;drawing a Queen&amp;quot;, and &amp;quot;drawing a Spade&amp;quot;.  We can tell off the bat that these are not disjoint events, because you can draw a queen that is also a spade.  There are four queens in the deck, so if we perform the experiment of drawing a card, putting it back in the deck and shuffling (what statisticians refer to as &#039;&#039;sampling with replacement&#039;&#039;, we will end up with a probability of &amp;lt;math&amp;gt;\frac{1}{13}&amp;lt;/math&amp;gt; for a queen draw.  By the same argument, we obtain a probability for drawing a spade as &amp;lt;math&amp;gt;\frac{1}{4}&amp;lt;/math&amp;gt;.  The expression &amp;lt;math&amp;gt;P(A\cup B)&amp;lt;/math&amp;gt; here can be translated as &amp;quot;the chance of drawing a queen or a spade&amp;quot;.  If we assume naively (as I used to) that for this case &amp;lt;math&amp;gt;P(A\cup B) = P(A) + P(B)&amp;lt;/math&amp;gt;, we can simply add our probabilities together for &amp;quot;the chance of drawing a queen or a spade&amp;quot; as &amp;lt;math&amp;gt;\frac{1}{13}+\frac{1}{4}&amp;lt;/math&amp;gt;.  If we were to gather some data experimentally, we would find that our results would differ from the prediction -- the probability observed would be slightly less than &amp;lt;math&amp;gt;\frac{1}{13}+\frac{1}{4}&amp;lt;/math&amp;gt;.  Why?  Because we&#039;re counting the queen of spades twice in our expression, once as a spade, and again as a queen.  We need to count it only once, as it can only be drawn with probability of &amp;lt;math&amp;gt;\frac{1}{52}&amp;lt;/math&amp;gt;.  [[Still confused?]]&lt;/div&gt;</summary>
		<author><name>69.118.80.7</name></author>
	</entry>
	<entry>
		<id>https://ideawaza.com/index.php?title=Introduction_to_Statistics&amp;diff=17029</id>
		<title>Introduction to Statistics</title>
		<link rel="alternate" type="text/html" href="https://ideawaza.com/index.php?title=Introduction_to_Statistics&amp;diff=17029"/>
		<updated>2005-06-28T21:38:22Z</updated>

		<summary type="html">&lt;p&gt;69.118.80.7: /* Probability */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Preamble ==&lt;br /&gt;
Probability and statistics is the most boring thing imaginable.  It&#039;s dull, unlike fancy math -- if you&#039;re ever at a cocktail party and want to impress someone, it&#039;s a lot easier to say you&#039;re a mathematician than to say you&#039;re a statistician.  It&#039;s also pretty abstract.  Most thorough explorations of the discipline are in very dry books that are short on examples.  If fact, if you&#039;re here it&#039;s probably because you&#039;re taking a stats class somewhere and your book and lecturer totally suck.  &lt;br /&gt;
&lt;br /&gt;
This aside, statistics is a central topic in modern life, and understanding just a little bit about it will help you a lot regardless of what you do or end up doing.  I hope this web site doesn&#039;t suck.  If it does, please leave comments on the discussion tab above.&lt;br /&gt;
&lt;br /&gt;
== Experiments, Outcomes and Events ==&lt;br /&gt;
&lt;br /&gt;
The easiest way to think of probability is in terms of experiments and their potential outcomes.  Many examples can be drawn from everyday experience:  On the drive home from work, you can encounter a flat tire, or have an uneventful drive; the outcome of an election can include either a win by candidate A, B, or C, or a runoff.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Definition:&#039;&#039;&#039; The entire collection of possible outcomes from an experiment is termed the &#039;&#039;sample space&#039;&#039;, indicated as &#039;&#039;&#039;&amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The simplest (albeit uninteresting) example would be an experiment with only one possible outcome, say &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  If we remember our set theory from elementary school, we can expressed the sample space as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega = \{ A \} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A more interesting example is the result of rolling a six sided dice.  The sample space for this experiment is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega = \{ 1,2,3,4,5,6 \}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We may be interested in &#039;&#039;events&#039;&#039; in an experiment.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Definition:&#039;&#039;&#039; An &#039;&#039;event&#039;&#039; is some subset of outcomes from the &#039;&#039;sample space&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In the dice example, events of interest might include&amp;lt;br&amp;gt;&lt;br /&gt;
a) the outcome is an even number&amp;lt;br&amp;gt;&lt;br /&gt;
b) the outcome is less than three&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These events can be expressed in terms of the possible outcomes from the experiment: &amp;lt;br&amp;gt;&lt;br /&gt;
a) : &amp;lt;math&amp;gt; \{2,4,6\} &amp;lt;/math&amp;gt; b) &amp;lt;math&amp;gt; \{ 1,2 \}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can borrow definitions from set theory to express events in terms of outcomes.  Here is a refresher of some terminology, and some new terms that will be important later: &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \cup &amp;lt;/math&amp;gt; represents the Union of two events&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:[http://en.wikipedia.org/wiki/Image:Venn_A_union_B.png]]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \cap &amp;lt;/math&amp;gt; represents the Interection of two events&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:[http://en.wikipedia.org/wiki/Image:Venn_A_intersect_B.png]]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\{\cdots\}^{c}&amp;lt;/math&amp;gt; represents the complement of an event.  For instance, &amp;quot;the outcome is an even number&amp;quot; is the complement of &amp;quot;the outcome is an odd number&amp;quot; in the dice example.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\varnothing&amp;lt;/math&amp;gt; or &amp;lt;math&amp;gt;\{\}&amp;lt;/math&amp;gt; represent an &#039;&#039;impossible event&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt; represents a &#039;&#039;certain event&#039;&#039; &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; are called &#039;&#039;disjoint events&#039;&#039; if &amp;lt;math&amp;gt;A\cap B = \varnothing&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Probability ==&lt;br /&gt;
Now that we know what events are, we should think a bit about a way to express the likelihood of an event occuring.  The classical definition of probability comes from the following.  If we can perform our experiment over and over in a way that is repeatable, we can count the number of times that the experiment gives rise to event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  We also keep track of the number of times that we perform the same experiment.  If we repeat the experiment a large enough number of times, we can express the probability of event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; as follows:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A) = \frac{N_{A}}{N} &amp;lt;/math&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;N_{A}&amp;lt;/math&amp;gt; is the number of times event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; occurred, and &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; is the number of times the experiment was repeated.  As &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; approaches infinity, the fraction above approaches the true probability of the event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  The value of &amp;lt;math&amp;gt;P(A)&amp;lt;/math&amp;gt; is clearly between 0 and 1.  If our event is the &#039;&#039;certain event&#039;&#039; &amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt;, then for each time we perform the experiment, the event &amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt; is observed; &amp;lt;math&amp;gt;N_{\Omega} = N&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;P(\Omega)=1&amp;lt;/math&amp;gt;.  If our event is the &#039;&#039;impossible event&#039;&#039; &amp;lt;math&amp;gt;\varnothing&amp;lt;/math&amp;gt;, we know &amp;lt;math&amp;gt;N_{\varnothing}=0&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; P(\varnothing) = 0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; are &#039;&#039;disjoint events&#039;&#039;, then whenever event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; is observed, then it is impossible for event &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; to be observed simultaneously.  Then&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;N(A\cup B) = N(A) + N(B)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Given our definition of probability, we can arrive at the following:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A\cup B) = P(A) + P(B)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At this point it&#039;s worth remembering that all events are not disjoint events.  I was originally confused by events and outcomes, and this was the source of many misunderstandings.  For events that are not disjoint, we end up with the following probability definition.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; P(A\cup B) = P(A) + P(B) - P(A\cap B)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
How can we see this from example?  Well, let&#039;s consider drawing from a deck of cards.  I&#039;ll define two &#039;&#039;events&#039;&#039;: &amp;quot;drawing a Queen&amp;quot;, and &amp;quot;drawing a Spade&amp;quot;.  We can tell off the bat that these are not disjoint events, because you can draw a queen that is also a spade.  There are four queens in the deck, so if we perform the experiment of drawing a card, putting it back in the deck and shuffling (what statisticians refer to as &#039;&#039;sampling with replacement&#039;&#039;, we will end up with a probability of &amp;lt;math&amp;gt;\frac{1}{13}&amp;lt;/math&amp;gt; for a queen draw.  By the same argument, we obtain a probability for drawing a spade as &amp;lt;math&amp;gt;\frac{1}{4}&amp;lt;/math&amp;gt;.  The expression &amp;lt;math&amp;gt;P(A\cup B)&amp;lt;/math&amp;gt; here can be translated as &amp;quot;the chance of drawing a queen or a spade&amp;quot;.  If we assume naively (as I used to) that for this case &amp;lt;math&amp;gt;P(A\cup B) = P(A) + P(B)&amp;lt;/math&amp;gt;, we can simply add our probabilities together for &amp;quot;the chance of drawing a queen or a spade&amp;quot; as &amp;lt;math&amp;gt;\frac{1}{13}+\frac{1}{4}&amp;lt;/math&amp;gt;.  If we were to gather some data experimentally, we would find that our results would differ from the prediction -- the probability observed would be slightly less than &amp;lt;math&amp;gt;\frac{1}{13}+\frac{1}{4}&amp;lt;/math&amp;gt;.  Why?  Because we&#039;re counting the queen of spades twice in our expression, once as a spade, and again as a queen.  We need to count it only once, as it can only be drawn with probability of &amp;lt;math&amp;gt;\frac{1}{52}&amp;lt;/math&amp;gt;.  Still confused?&lt;/div&gt;</summary>
		<author><name>69.118.80.7</name></author>
	</entry>
	<entry>
		<id>https://ideawaza.com/index.php?title=Introduction_to_Statistics&amp;diff=17028</id>
		<title>Introduction to Statistics</title>
		<link rel="alternate" type="text/html" href="https://ideawaza.com/index.php?title=Introduction_to_Statistics&amp;diff=17028"/>
		<updated>2005-06-28T21:25:06Z</updated>

		<summary type="html">&lt;p&gt;69.118.80.7: /* Probability */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Preamble ==&lt;br /&gt;
Probability and statistics is the most boring thing imaginable.  It&#039;s dull, unlike fancy math -- if you&#039;re ever at a cocktail party and want to impress someone, it&#039;s a lot easier to say you&#039;re a mathematician than to say you&#039;re a statistician.  It&#039;s also pretty abstract.  Most thorough explorations of the discipline are in very dry books that are short on examples.  If fact, if you&#039;re here it&#039;s probably because you&#039;re taking a stats class somewhere and your book and lecturer totally suck.  &lt;br /&gt;
&lt;br /&gt;
This aside, statistics is a central topic in modern life, and understanding just a little bit about it will help you a lot regardless of what you do or end up doing.  I hope this web site doesn&#039;t suck.  If it does, please leave comments on the discussion tab above.&lt;br /&gt;
&lt;br /&gt;
== Experiments, Outcomes and Events ==&lt;br /&gt;
&lt;br /&gt;
The easiest way to think of probability is in terms of experiments and their potential outcomes.  Many examples can be drawn from everyday experience:  On the drive home from work, you can encounter a flat tire, or have an uneventful drive; the outcome of an election can include either a win by candidate A, B, or C, or a runoff.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Definition:&#039;&#039;&#039; The entire collection of possible outcomes from an experiment is termed the &#039;&#039;sample space&#039;&#039;, indicated as &#039;&#039;&#039;&amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The simplest (albeit uninteresting) example would be an experiment with only one possible outcome, say &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  If we remember our set theory from elementary school, we can expressed the sample space as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega = \{ A \} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A more interesting example is the result of rolling a six sided dice.  The sample space for this experiment is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega = \{ 1,2,3,4,5,6 \}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We may be interested in &#039;&#039;events&#039;&#039; in an experiment.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Definition:&#039;&#039;&#039; An &#039;&#039;event&#039;&#039; is some subset of outcomes from the &#039;&#039;sample space&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In the dice example, events of interest might include&amp;lt;br&amp;gt;&lt;br /&gt;
a) the outcome is an even number&amp;lt;br&amp;gt;&lt;br /&gt;
b) the outcome is less than three&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These events can be expressed in terms of the possible outcomes from the experiment: &amp;lt;br&amp;gt;&lt;br /&gt;
a) : &amp;lt;math&amp;gt; \{2,4,6\} &amp;lt;/math&amp;gt; b) &amp;lt;math&amp;gt; \{ 1,2 \}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can borrow definitions from set theory to express events in terms of outcomes.  Here is a refresher of some terminology, and some new terms that will be important later: &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \cup &amp;lt;/math&amp;gt; represents the Union of two events&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:[http://en.wikipedia.org/wiki/Image:Venn_A_union_B.png]]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \cap &amp;lt;/math&amp;gt; represents the Interection of two events&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:[http://en.wikipedia.org/wiki/Image:Venn_A_intersect_B.png]]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\{\cdots\}^{c}&amp;lt;/math&amp;gt; represents the complement of an event.  For instance, &amp;quot;the outcome is an even number&amp;quot; is the complement of &amp;quot;the outcome is an odd number&amp;quot; in the dice example.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\varnothing&amp;lt;/math&amp;gt; or &amp;lt;math&amp;gt;\{\}&amp;lt;/math&amp;gt; represent an &#039;&#039;impossible event&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt; represents a &#039;&#039;certain event&#039;&#039; &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; are called &#039;&#039;disjoint events&#039;&#039; if &amp;lt;math&amp;gt;A\cap B = \varnothing&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Probability ==&lt;br /&gt;
Now that we know what events are, we should think a bit about a way to express the likelihood of an event occuring.  The classical definition of probability comes from the following.  If we can perform our experiment over and over in a way that is repeatable, we can count the number of times that the experiment gives rise to event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  We also keep track of the number of times that we perform the same experiment.  If we repeat the experiment a large enough number of times, we can express the probability of event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; as follows:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A) = \frac{N_{A}}{N} &amp;lt;/math&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;N_{A}&amp;lt;/math&amp;gt; is the number of times event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; occurred, and &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; is the number of times the experiment was repeated.  As &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; approaches infinity, the fraction above approaches the true probability of the event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  The value of &amp;lt;math&amp;gt;P(A)&amp;lt;/math&amp;gt; is clearly between 0 and 1.  If our event is the &#039;&#039;certain event&#039;&#039; &amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt;, then for each time we perform the experiment, the event &amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt; is observed; &amp;lt;math&amp;gt;N_{\Omega} = N&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;P(\Omega)=1&amp;lt;/math&amp;gt;.  If our event is the &#039;&#039;impossible event&#039;&#039; &amp;lt;math&amp;gt;\varnothing&amp;lt;/math&amp;gt;, we know &amp;lt;math&amp;gt;N_{\varnothing}=0&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; P(\varnothing) = 0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; are &#039;&#039;disjoint events&#039;&#039;, then whenever event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; is observed, then it is impossible for event &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; to be observed simultaneously.  Then&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;N(A\cup B) = N(A) + N(B)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Given our definition of probability, we can arrive at the following:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A\cup B) = P(A) + P(B)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At this point it&#039;s worth remembering that all events are not disjoint events.  I was originally confused by events and outcomes, and this was the source of many misunderstandings.  For events that are not disjoint, we end up with the following probability definition.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; P(A\cup B) = P(A) + P(B) - P(A\cap B)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
How can we see this from example?  Well, let&#039;s consider drawing from a deck of cards.  I&#039;ll define two &#039;&#039;events&#039;&#039;: &amp;quot;drawing a Queen&amp;quot;, and &amp;quot;drawing a Spade&amp;quot;.  We can tell off the bat that these are not disjoint events, because you can draw a queen that is also a spade.  There are four queens in the deck, so if we perform the experiment of drawing a card, putting it back in the deck and shuffling (what statisticians refer to as &#039;&#039;sampling with replacement&#039;&#039;, we will end up with a probability of &amp;lt;math&amp;gt;\frac{1}{13}&amp;lt;/math&amp;gt; for a queen draw.  By the same argument, we obtain a probability for drawing a spade as &amp;lt;math&amp;gt;\frac{1}{4}&amp;lt;/math&amp;gt;.  The expression &amp;lt;math&amp;gt;P(A\cup B)&amp;lt;/math&amp;gt; here can be translated as &amp;quot;the chance of drawing a queen or a spade&amp;quot;.  If we assume naively (as I used to) that for this case &amp;lt;math&amp;gt;P(A\cup B) = P(A) + P(B)&amp;lt;/math&amp;gt;, we can simply add our probabilities together for &amp;quot;the chance of drawing a queen or a spade&amp;quot; as &amp;lt;math&amp;gt;\frac{1}{13}+\frac{1}{4}&amp;lt;/math&amp;gt;.  If we were to gather some data experimentally, we would find that our results would differ from the prediction -- the probability observed would be slightly less than &amp;lt;math&amp;gt;\frac{1}{13}+\frac{1}{4}&amp;lt;/math&amp;gt;.  Why?&lt;/div&gt;</summary>
		<author><name>69.118.80.7</name></author>
	</entry>
	<entry>
		<id>https://ideawaza.com/index.php?title=Introduction_to_Statistics&amp;diff=17027</id>
		<title>Introduction to Statistics</title>
		<link rel="alternate" type="text/html" href="https://ideawaza.com/index.php?title=Introduction_to_Statistics&amp;diff=17027"/>
		<updated>2005-06-28T21:16:49Z</updated>

		<summary type="html">&lt;p&gt;69.118.80.7: /* Preamble */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Preamble ==&lt;br /&gt;
Probability and statistics is the most boring thing imaginable.  It&#039;s dull, unlike fancy math -- if you&#039;re ever at a cocktail party and want to impress someone, it&#039;s a lot easier to say you&#039;re a mathematician than to say you&#039;re a statistician.  It&#039;s also pretty abstract.  Most thorough explorations of the discipline are in very dry books that are short on examples.  If fact, if you&#039;re here it&#039;s probably because you&#039;re taking a stats class somewhere and your book and lecturer totally suck.  &lt;br /&gt;
&lt;br /&gt;
This aside, statistics is a central topic in modern life, and understanding just a little bit about it will help you a lot regardless of what you do or end up doing.  I hope this web site doesn&#039;t suck.  If it does, please leave comments on the discussion tab above.&lt;br /&gt;
&lt;br /&gt;
== Experiments, Outcomes and Events ==&lt;br /&gt;
&lt;br /&gt;
The easiest way to think of probability is in terms of experiments and their potential outcomes.  Many examples can be drawn from everyday experience:  On the drive home from work, you can encounter a flat tire, or have an uneventful drive; the outcome of an election can include either a win by candidate A, B, or C, or a runoff.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Definition:&#039;&#039;&#039; The entire collection of possible outcomes from an experiment is termed the &#039;&#039;sample space&#039;&#039;, indicated as &#039;&#039;&#039;&amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The simplest (albeit uninteresting) example would be an experiment with only one possible outcome, say &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  If we remember our set theory from elementary school, we can expressed the sample space as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega = \{ A \} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A more interesting example is the result of rolling a six sided dice.  The sample space for this experiment is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega = \{ 1,2,3,4,5,6 \}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We may be interested in &#039;&#039;events&#039;&#039; in an experiment.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Definition:&#039;&#039;&#039; An &#039;&#039;event&#039;&#039; is some subset of outcomes from the &#039;&#039;sample space&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In the dice example, events of interest might include&amp;lt;br&amp;gt;&lt;br /&gt;
a) the outcome is an even number&amp;lt;br&amp;gt;&lt;br /&gt;
b) the outcome is less than three&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These events can be expressed in terms of the possible outcomes from the experiment: &amp;lt;br&amp;gt;&lt;br /&gt;
a) : &amp;lt;math&amp;gt; \{2,4,6\} &amp;lt;/math&amp;gt; b) &amp;lt;math&amp;gt; \{ 1,2 \}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can borrow definitions from set theory to express events in terms of outcomes.  Here is a refresher of some terminology, and some new terms that will be important later: &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \cup &amp;lt;/math&amp;gt; represents the Union of two events&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:[http://en.wikipedia.org/wiki/Image:Venn_A_union_B.png]]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \cap &amp;lt;/math&amp;gt; represents the Interection of two events&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:[http://en.wikipedia.org/wiki/Image:Venn_A_intersect_B.png]]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\{\cdots\}^{c}&amp;lt;/math&amp;gt; represents the complement of an event.  For instance, &amp;quot;the outcome is an even number&amp;quot; is the complement of &amp;quot;the outcome is an odd number&amp;quot; in the dice example.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\varnothing&amp;lt;/math&amp;gt; or &amp;lt;math&amp;gt;\{\}&amp;lt;/math&amp;gt; represent an &#039;&#039;impossible event&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt; represents a &#039;&#039;certain event&#039;&#039; &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; are called &#039;&#039;disjoint events&#039;&#039; if &amp;lt;math&amp;gt;A\cap B = \varnothing&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Probability ==&lt;br /&gt;
Now that we know what events are, we should think a bit about a way to express the likelihood of an event occuring.  The classical definition of probability comes from the following.  If we can perform our experiment over and over in a way that is repeatable, we can count the number of times that the experiment gives rise to event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  We also keep track of the number of times that we perform the same experiment.  If we repeat the experiment a large enough number of times, we can express the probability of event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; as follows:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A) = \frac{N_{A}}{N} &amp;lt;/math&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;N_{A}&amp;lt;/math&amp;gt; is the number of times event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; occurred, and &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; is the number of times the experiment was repeated.  As &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; approaches infinity, the fraction above approaches the true probability of the event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  The value of &amp;lt;math&amp;gt;P(A)&amp;lt;/math&amp;gt; is clearly between 0 and 1.  If our event is the &#039;&#039;certain event&#039;&#039; &amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt;, then for each time we perform the experiment, the event &amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt; is observed; &amp;lt;math&amp;gt;N_{\Omega} = N&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;P(\Omega)=1&amp;lt;/math&amp;gt;.  If our event is the &#039;&#039;impossible event&#039;&#039; &amp;lt;math&amp;gt;\varnothing&amp;lt;/math&amp;gt;, we know &amp;lt;math&amp;gt;N_{\varnothing}=0&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; P(\varnothing) = 0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; are &#039;&#039;disjoint events&#039;&#039;, then whenever event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; is observed, then it is impossible for event &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; to be observed simultaneously.  Then&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;N(A\cup B) = N(A) + N(B)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Given our definition of probability, we can arrive at the following:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A\cup B) = P(A) + P(B)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At this point it&#039;s worth remembering that all events are not disjoint events.  I was originally confused by events and outcomes, and this was the source of many misunderstandings.  For events that are not disjoint, we end up with the following probability definition.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; P(A\cup B) = P(A) + P(B) - P(A\cap B)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
How can we see this from example?  Well, let&#039;s consider drawing from a deck of cards.  I&#039;ll define two &#039;&#039;events&#039;&#039;: &amp;quot;drawing a Queen&amp;quot;, and &amp;quot;drawing a Spade&amp;quot;.  We can tell off the bat that these are not disjoint events, because you can draw a queen that is also a spade.  There are four queens in the deck, so if we perform the experiment of drawing a card, putting it back in the deck and shuffling (what statisticians refer to as &#039;&#039;sampling with replacement&#039;&#039;, we will end up with a probability of &amp;lt;math&amp;gt;\frac{1}{13}&amp;lt;/math&amp;gt; for a queen draw.  By the same argument, we obtain a probability for drawing a spade as &amp;lt;math&amp;gt;\frac{1}{4}&amp;lt;/math&amp;gt;.&lt;/div&gt;</summary>
		<author><name>69.118.80.7</name></author>
	</entry>
	<entry>
		<id>https://ideawaza.com/index.php?title=Introduction_to_Statistics&amp;diff=17026</id>
		<title>Introduction to Statistics</title>
		<link rel="alternate" type="text/html" href="https://ideawaza.com/index.php?title=Introduction_to_Statistics&amp;diff=17026"/>
		<updated>2005-06-28T21:15:52Z</updated>

		<summary type="html">&lt;p&gt;69.118.80.7: /* Probability */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Preamble ==&lt;br /&gt;
Probability and statistics is the most boring thing imaginable.  It&#039;s dull, unlike fancy math -- if you&#039;re ever at a cocktail party and want to impress someone, it&#039;s a lot easier to say you&#039;re a mathematician than to say you&#039;re a statistician.  It&#039;s also pretty abstract.  Most thorough explorations of the discipline are in very dry books that are short on examples.  If fact, if you&#039;re here it&#039;s probably because you&#039;re taking a stats class somewhere and your book totally sucks.  &lt;br /&gt;
&lt;br /&gt;
This aside, statistics is a central topic in modern life, and understanding just a little bit about it will help you a lot regardless of what you do or end up doing.  I hope this web site doesn&#039;t suck.  If it does, please leave comments on the discussion tab above.&lt;br /&gt;
&lt;br /&gt;
== Experiments, Outcomes and Events ==&lt;br /&gt;
&lt;br /&gt;
The easiest way to think of probability is in terms of experiments and their potential outcomes.  Many examples can be drawn from everyday experience:  On the drive home from work, you can encounter a flat tire, or have an uneventful drive; the outcome of an election can include either a win by candidate A, B, or C, or a runoff.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Definition:&#039;&#039;&#039; The entire collection of possible outcomes from an experiment is termed the &#039;&#039;sample space&#039;&#039;, indicated as &#039;&#039;&#039;&amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The simplest (albeit uninteresting) example would be an experiment with only one possible outcome, say &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  If we remember our set theory from elementary school, we can expressed the sample space as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega = \{ A \} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A more interesting example is the result of rolling a six sided dice.  The sample space for this experiment is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega = \{ 1,2,3,4,5,6 \}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We may be interested in &#039;&#039;events&#039;&#039; in an experiment.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Definition:&#039;&#039;&#039; An &#039;&#039;event&#039;&#039; is some subset of outcomes from the &#039;&#039;sample space&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In the dice example, events of interest might include&amp;lt;br&amp;gt;&lt;br /&gt;
a) the outcome is an even number&amp;lt;br&amp;gt;&lt;br /&gt;
b) the outcome is less than three&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These events can be expressed in terms of the possible outcomes from the experiment: &amp;lt;br&amp;gt;&lt;br /&gt;
a) : &amp;lt;math&amp;gt; \{2,4,6\} &amp;lt;/math&amp;gt; b) &amp;lt;math&amp;gt; \{ 1,2 \}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can borrow definitions from set theory to express events in terms of outcomes.  Here is a refresher of some terminology, and some new terms that will be important later: &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \cup &amp;lt;/math&amp;gt; represents the Union of two events&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:[http://en.wikipedia.org/wiki/Image:Venn_A_union_B.png]]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \cap &amp;lt;/math&amp;gt; represents the Interection of two events&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:[http://en.wikipedia.org/wiki/Image:Venn_A_intersect_B.png]]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\{\cdots\}^{c}&amp;lt;/math&amp;gt; represents the complement of an event.  For instance, &amp;quot;the outcome is an even number&amp;quot; is the complement of &amp;quot;the outcome is an odd number&amp;quot; in the dice example.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\varnothing&amp;lt;/math&amp;gt; or &amp;lt;math&amp;gt;\{\}&amp;lt;/math&amp;gt; represent an &#039;&#039;impossible event&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt; represents a &#039;&#039;certain event&#039;&#039; &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; are called &#039;&#039;disjoint events&#039;&#039; if &amp;lt;math&amp;gt;A\cap B = \varnothing&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Probability ==&lt;br /&gt;
Now that we know what events are, we should think a bit about a way to express the likelihood of an event occuring.  The classical definition of probability comes from the following.  If we can perform our experiment over and over in a way that is repeatable, we can count the number of times that the experiment gives rise to event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  We also keep track of the number of times that we perform the same experiment.  If we repeat the experiment a large enough number of times, we can express the probability of event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; as follows:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A) = \frac{N_{A}}{N} &amp;lt;/math&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;N_{A}&amp;lt;/math&amp;gt; is the number of times event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; occurred, and &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; is the number of times the experiment was repeated.  As &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; approaches infinity, the fraction above approaches the true probability of the event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  The value of &amp;lt;math&amp;gt;P(A)&amp;lt;/math&amp;gt; is clearly between 0 and 1.  If our event is the &#039;&#039;certain event&#039;&#039; &amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt;, then for each time we perform the experiment, the event &amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt; is observed; &amp;lt;math&amp;gt;N_{\Omega} = N&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;P(\Omega)=1&amp;lt;/math&amp;gt;.  If our event is the &#039;&#039;impossible event&#039;&#039; &amp;lt;math&amp;gt;\varnothing&amp;lt;/math&amp;gt;, we know &amp;lt;math&amp;gt;N_{\varnothing}=0&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; P(\varnothing) = 0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; are &#039;&#039;disjoint events&#039;&#039;, then whenever event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; is observed, then it is impossible for event &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; to be observed simultaneously.  Then&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;N(A\cup B) = N(A) + N(B)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Given our definition of probability, we can arrive at the following:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A\cup B) = P(A) + P(B)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At this point it&#039;s worth remembering that all events are not disjoint events.  I was originally confused by events and outcomes, and this was the source of many misunderstandings.  For events that are not disjoint, we end up with the following probability definition.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; P(A\cup B) = P(A) + P(B) - P(A\cap B)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
How can we see this from example?  Well, let&#039;s consider drawing from a deck of cards.  I&#039;ll define two &#039;&#039;events&#039;&#039;: &amp;quot;drawing a Queen&amp;quot;, and &amp;quot;drawing a Spade&amp;quot;.  We can tell off the bat that these are not disjoint events, because you can draw a queen that is also a spade.  There are four queens in the deck, so if we perform the experiment of drawing a card, putting it back in the deck and shuffling (what statisticians refer to as &#039;&#039;sampling with replacement&#039;&#039;, we will end up with a probability of &amp;lt;math&amp;gt;\frac{1}{13}&amp;lt;/math&amp;gt; for a queen draw.  By the same argument, we obtain a probability for drawing a spade as &amp;lt;math&amp;gt;\frac{1}{4}&amp;lt;/math&amp;gt;.&lt;/div&gt;</summary>
		<author><name>69.118.80.7</name></author>
	</entry>
	<entry>
		<id>https://ideawaza.com/index.php?title=Introduction_to_Statistics&amp;diff=17025</id>
		<title>Introduction to Statistics</title>
		<link rel="alternate" type="text/html" href="https://ideawaza.com/index.php?title=Introduction_to_Statistics&amp;diff=17025"/>
		<updated>2005-06-28T21:02:40Z</updated>

		<summary type="html">&lt;p&gt;69.118.80.7: /* Preable */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Preamble ==&lt;br /&gt;
Probability and statistics is the most boring thing imaginable.  It&#039;s dull, unlike fancy math -- if you&#039;re ever at a cocktail party and want to impress someone, it&#039;s a lot easier to say you&#039;re a mathematician than to say you&#039;re a statistician.  It&#039;s also pretty abstract.  Most thorough explorations of the discipline are in very dry books that are short on examples.  If fact, if you&#039;re here it&#039;s probably because you&#039;re taking a stats class somewhere and your book totally sucks.  &lt;br /&gt;
&lt;br /&gt;
This aside, statistics is a central topic in modern life, and understanding just a little bit about it will help you a lot regardless of what you do or end up doing.  I hope this web site doesn&#039;t suck.  If it does, please leave comments on the discussion tab above.&lt;br /&gt;
&lt;br /&gt;
== Experiments, Outcomes and Events ==&lt;br /&gt;
&lt;br /&gt;
The easiest way to think of probability is in terms of experiments and their potential outcomes.  Many examples can be drawn from everyday experience:  On the drive home from work, you can encounter a flat tire, or have an uneventful drive; the outcome of an election can include either a win by candidate A, B, or C, or a runoff.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Definition:&#039;&#039;&#039; The entire collection of possible outcomes from an experiment is termed the &#039;&#039;sample space&#039;&#039;, indicated as &#039;&#039;&#039;&amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The simplest (albeit uninteresting) example would be an experiment with only one possible outcome, say &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  If we remember our set theory from elementary school, we can expressed the sample space as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega = \{ A \} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A more interesting example is the result of rolling a six sided dice.  The sample space for this experiment is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega = \{ 1,2,3,4,5,6 \}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We may be interested in &#039;&#039;events&#039;&#039; in an experiment.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Definition:&#039;&#039;&#039; An &#039;&#039;event&#039;&#039; is some subset of outcomes from the &#039;&#039;sample space&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In the dice example, events of interest might include&amp;lt;br&amp;gt;&lt;br /&gt;
a) the outcome is an even number&amp;lt;br&amp;gt;&lt;br /&gt;
b) the outcome is less than three&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These events can be expressed in terms of the possible outcomes from the experiment: &amp;lt;br&amp;gt;&lt;br /&gt;
a) : &amp;lt;math&amp;gt; \{2,4,6\} &amp;lt;/math&amp;gt; b) &amp;lt;math&amp;gt; \{ 1,2 \}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can borrow definitions from set theory to express events in terms of outcomes.  Here is a refresher of some terminology, and some new terms that will be important later: &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \cup &amp;lt;/math&amp;gt; represents the Union of two events&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:[http://en.wikipedia.org/wiki/Image:Venn_A_union_B.png]]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \cap &amp;lt;/math&amp;gt; represents the Interection of two events&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:[http://en.wikipedia.org/wiki/Image:Venn_A_intersect_B.png]]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\{\cdots\}^{c}&amp;lt;/math&amp;gt; represents the complement of an event.  For instance, &amp;quot;the outcome is an even number&amp;quot; is the complement of &amp;quot;the outcome is an odd number&amp;quot; in the dice example.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\varnothing&amp;lt;/math&amp;gt; or &amp;lt;math&amp;gt;\{\}&amp;lt;/math&amp;gt; represent an &#039;&#039;impossible event&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt; represents a &#039;&#039;certain event&#039;&#039; &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; are called &#039;&#039;disjoint events&#039;&#039; if &amp;lt;math&amp;gt;A\cap B = \varnothing&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Probability ==&lt;br /&gt;
Now that we know what events are, we should think a bit about a way to express the likelihood of an event occuring.  The classical definition of probability comes from the following.  If we can perform our experiment over and over in a way that is repeatable, we can count the number of times that the experiment gives rise to event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  We also keep track of the number of times that we perform the same experiment.  If we repeat the experiment a large enough number of times, we can express the probability of event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; as follows:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A) = \frac{N_{A}}{N} &amp;lt;/math&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;N_{A}&amp;lt;/math&amp;gt; is the number of times event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; occurred, and &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; is the number of times the experiment was repeated.  As &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; approaches infinity, the fraction above approaches the true probability of the event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  The value of &amp;lt;math&amp;gt;P(A)&amp;lt;/math&amp;gt; is clearly between 0 and 1.  If our event is the &#039;&#039;certain event&#039;&#039; &amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt;, then for each time we perform the experiment, the event &amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt; is observed; &amp;lt;math&amp;gt;N_{\Omega} = N&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;P(\Omega)=1&amp;lt;/math&amp;gt;.  If our event is the &#039;&#039;impossible event&#039;&#039; &amp;lt;math&amp;gt;\varnothing&amp;lt;/math&amp;gt;, we know &amp;lt;math&amp;gt;N_{\varnothing}=0&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; P(\varnothing) = 0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; are &#039;&#039;disjoint events&#039;&#039;, then whenever event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; is observed, then it is impossible for event &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; to be observed simultaneously.  Then&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;N(A\cup B) = N(A) + N(B)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Given our definition of probability, we can arrive at the following:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A\cup B) = P(A) + P(B)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At this point it&#039;s worth remembering that all events are not disjoint events.  I was originally confused by events and outcomes, and this was the source of many misunderstandings.  For events that are not disjoint, we end up with the following probability definition.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; P(A\cup B) = P(A) + P(B) - P(A\cap B)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
How can we see this from example?  Well, let&#039;s consider drawing from a deck of cards.  I&#039;ll define two &#039;&#039;events&#039;&#039;: &amp;quot;drawing a Queen&amp;quot;, and &amp;quot;drawing a Spade&amp;quot;.&lt;/div&gt;</summary>
		<author><name>69.118.80.7</name></author>
	</entry>
	<entry>
		<id>https://ideawaza.com/index.php?title=Introduction_to_Statistics&amp;diff=17024</id>
		<title>Introduction to Statistics</title>
		<link rel="alternate" type="text/html" href="https://ideawaza.com/index.php?title=Introduction_to_Statistics&amp;diff=17024"/>
		<updated>2005-06-28T21:02:27Z</updated>

		<summary type="html">&lt;p&gt;69.118.80.7: /* Preable */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Preable ==&lt;br /&gt;
Probability and statistics is the most boring thing imaginable.  It&#039;s dull, unlike fancy math -- if you&#039;re ever at a cocktail party and want to impress someone, it&#039;s a lot easier to say you&#039;re a mathematician than to say you&#039;re a statistician.  It&#039;s also pretty abstract.  Most thorough explorations of the discipline are in very dry books that are short on examples.  If fact, if you&#039;re here it&#039;s probably because you&#039;re taking a stats class somewhere and your book totally sucks.  &lt;br /&gt;
&lt;br /&gt;
This aside, statistics is a central topic in modern life, and understanding just a little bit about it will help you a lot regardless of what you do or end up doing.  I hope this web site doesn&#039;t suck.  If it does, please leave comments on the discussion tab above.&lt;br /&gt;
&lt;br /&gt;
== Experiments, Outcomes and Events ==&lt;br /&gt;
&lt;br /&gt;
The easiest way to think of probability is in terms of experiments and their potential outcomes.  Many examples can be drawn from everyday experience:  On the drive home from work, you can encounter a flat tire, or have an uneventful drive; the outcome of an election can include either a win by candidate A, B, or C, or a runoff.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Definition:&#039;&#039;&#039; The entire collection of possible outcomes from an experiment is termed the &#039;&#039;sample space&#039;&#039;, indicated as &#039;&#039;&#039;&amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The simplest (albeit uninteresting) example would be an experiment with only one possible outcome, say &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  If we remember our set theory from elementary school, we can expressed the sample space as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega = \{ A \} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A more interesting example is the result of rolling a six sided dice.  The sample space for this experiment is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega = \{ 1,2,3,4,5,6 \}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We may be interested in &#039;&#039;events&#039;&#039; in an experiment.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Definition:&#039;&#039;&#039; An &#039;&#039;event&#039;&#039; is some subset of outcomes from the &#039;&#039;sample space&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In the dice example, events of interest might include&amp;lt;br&amp;gt;&lt;br /&gt;
a) the outcome is an even number&amp;lt;br&amp;gt;&lt;br /&gt;
b) the outcome is less than three&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These events can be expressed in terms of the possible outcomes from the experiment: &amp;lt;br&amp;gt;&lt;br /&gt;
a) : &amp;lt;math&amp;gt; \{2,4,6\} &amp;lt;/math&amp;gt; b) &amp;lt;math&amp;gt; \{ 1,2 \}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can borrow definitions from set theory to express events in terms of outcomes.  Here is a refresher of some terminology, and some new terms that will be important later: &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \cup &amp;lt;/math&amp;gt; represents the Union of two events&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:[http://en.wikipedia.org/wiki/Image:Venn_A_union_B.png]]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \cap &amp;lt;/math&amp;gt; represents the Interection of two events&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:[http://en.wikipedia.org/wiki/Image:Venn_A_intersect_B.png]]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\{\cdots\}^{c}&amp;lt;/math&amp;gt; represents the complement of an event.  For instance, &amp;quot;the outcome is an even number&amp;quot; is the complement of &amp;quot;the outcome is an odd number&amp;quot; in the dice example.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\varnothing&amp;lt;/math&amp;gt; or &amp;lt;math&amp;gt;\{\}&amp;lt;/math&amp;gt; represent an &#039;&#039;impossible event&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt; represents a &#039;&#039;certain event&#039;&#039; &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; are called &#039;&#039;disjoint events&#039;&#039; if &amp;lt;math&amp;gt;A\cap B = \varnothing&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Probability ==&lt;br /&gt;
Now that we know what events are, we should think a bit about a way to express the likelihood of an event occuring.  The classical definition of probability comes from the following.  If we can perform our experiment over and over in a way that is repeatable, we can count the number of times that the experiment gives rise to event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  We also keep track of the number of times that we perform the same experiment.  If we repeat the experiment a large enough number of times, we can express the probability of event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; as follows:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A) = \frac{N_{A}}{N} &amp;lt;/math&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;N_{A}&amp;lt;/math&amp;gt; is the number of times event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; occurred, and &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; is the number of times the experiment was repeated.  As &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; approaches infinity, the fraction above approaches the true probability of the event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  The value of &amp;lt;math&amp;gt;P(A)&amp;lt;/math&amp;gt; is clearly between 0 and 1.  If our event is the &#039;&#039;certain event&#039;&#039; &amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt;, then for each time we perform the experiment, the event &amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt; is observed; &amp;lt;math&amp;gt;N_{\Omega} = N&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;P(\Omega)=1&amp;lt;/math&amp;gt;.  If our event is the &#039;&#039;impossible event&#039;&#039; &amp;lt;math&amp;gt;\varnothing&amp;lt;/math&amp;gt;, we know &amp;lt;math&amp;gt;N_{\varnothing}=0&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; P(\varnothing) = 0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; are &#039;&#039;disjoint events&#039;&#039;, then whenever event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; is observed, then it is impossible for event &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; to be observed simultaneously.  Then&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;N(A\cup B) = N(A) + N(B)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Given our definition of probability, we can arrive at the following:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A\cup B) = P(A) + P(B)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At this point it&#039;s worth remembering that all events are not disjoint events.  I was originally confused by events and outcomes, and this was the source of many misunderstandings.  For events that are not disjoint, we end up with the following probability definition.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; P(A\cup B) = P(A) + P(B) - P(A\cap B)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
How can we see this from example?  Well, let&#039;s consider drawing from a deck of cards.  I&#039;ll define two &#039;&#039;events&#039;&#039;: &amp;quot;drawing a Queen&amp;quot;, and &amp;quot;drawing a Spade&amp;quot;.&lt;/div&gt;</summary>
		<author><name>69.118.80.7</name></author>
	</entry>
	<entry>
		<id>https://ideawaza.com/index.php?title=Introduction_to_Statistics&amp;diff=17023</id>
		<title>Introduction to Statistics</title>
		<link rel="alternate" type="text/html" href="https://ideawaza.com/index.php?title=Introduction_to_Statistics&amp;diff=17023"/>
		<updated>2005-06-28T21:00:12Z</updated>

		<summary type="html">&lt;p&gt;69.118.80.7: /* Experiments, Outcomes and Events */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Preable ==&lt;br /&gt;
Probability and statistics is the most boring thing imaginable.  It&#039;s dull, unlike fancy math -- if you&#039;re ever at a cocktail party and want to impress someone, it&#039;s a lot easier to say you&#039;re a mathematician than to say you&#039;re a statistician.  It&#039;s also pretty abstract.  Most thorough explorations of the discipline a very dry books that are short on examples.  If fact, if you&#039;re here it&#039;s probably because you&#039;re taking a stats class somewhere and your book totally sucks.  I hope this web site doesn&#039;t suck.  If it does, please leave comments on the discussion tab above.&lt;br /&gt;
&lt;br /&gt;
== Experiments, Outcomes and Events ==&lt;br /&gt;
&lt;br /&gt;
The easiest way to think of probability is in terms of experiments and their potential outcomes.  Many examples can be drawn from everyday experience:  On the drive home from work, you can encounter a flat tire, or have an uneventful drive; the outcome of an election can include either a win by candidate A, B, or C, or a runoff.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Definition:&#039;&#039;&#039; The entire collection of possible outcomes from an experiment is termed the &#039;&#039;sample space&#039;&#039;, indicated as &#039;&#039;&#039;&amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The simplest (albeit uninteresting) example would be an experiment with only one possible outcome, say &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  If we remember our set theory from elementary school, we can expressed the sample space as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega = \{ A \} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A more interesting example is the result of rolling a six sided dice.  The sample space for this experiment is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega = \{ 1,2,3,4,5,6 \}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We may be interested in &#039;&#039;events&#039;&#039; in an experiment.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Definition:&#039;&#039;&#039; An &#039;&#039;event&#039;&#039; is some subset of outcomes from the &#039;&#039;sample space&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In the dice example, events of interest might include&amp;lt;br&amp;gt;&lt;br /&gt;
a) the outcome is an even number&amp;lt;br&amp;gt;&lt;br /&gt;
b) the outcome is less than three&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These events can be expressed in terms of the possible outcomes from the experiment: &amp;lt;br&amp;gt;&lt;br /&gt;
a) : &amp;lt;math&amp;gt; \{2,4,6\} &amp;lt;/math&amp;gt; b) &amp;lt;math&amp;gt; \{ 1,2 \}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can borrow definitions from set theory to express events in terms of outcomes.  Here is a refresher of some terminology, and some new terms that will be important later: &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \cup &amp;lt;/math&amp;gt; represents the Union of two events&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:[http://en.wikipedia.org/wiki/Image:Venn_A_union_B.png]]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \cap &amp;lt;/math&amp;gt; represents the Interection of two events&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:[http://en.wikipedia.org/wiki/Image:Venn_A_intersect_B.png]]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\{\cdots\}^{c}&amp;lt;/math&amp;gt; represents the complement of an event.  For instance, &amp;quot;the outcome is an even number&amp;quot; is the complement of &amp;quot;the outcome is an odd number&amp;quot; in the dice example.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\varnothing&amp;lt;/math&amp;gt; or &amp;lt;math&amp;gt;\{\}&amp;lt;/math&amp;gt; represent an &#039;&#039;impossible event&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt; represents a &#039;&#039;certain event&#039;&#039; &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; are called &#039;&#039;disjoint events&#039;&#039; if &amp;lt;math&amp;gt;A\cap B = \varnothing&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Probability ==&lt;br /&gt;
Now that we know what events are, we should think a bit about a way to express the likelihood of an event occuring.  The classical definition of probability comes from the following.  If we can perform our experiment over and over in a way that is repeatable, we can count the number of times that the experiment gives rise to event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  We also keep track of the number of times that we perform the same experiment.  If we repeat the experiment a large enough number of times, we can express the probability of event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; as follows:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A) = \frac{N_{A}}{N} &amp;lt;/math&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;N_{A}&amp;lt;/math&amp;gt; is the number of times event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; occurred, and &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; is the number of times the experiment was repeated.  As &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; approaches infinity, the fraction above approaches the true probability of the event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  The value of &amp;lt;math&amp;gt;P(A)&amp;lt;/math&amp;gt; is clearly between 0 and 1.  If our event is the &#039;&#039;certain event&#039;&#039; &amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt;, then for each time we perform the experiment, the event &amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt; is observed; &amp;lt;math&amp;gt;N_{\Omega} = N&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;P(\Omega)=1&amp;lt;/math&amp;gt;.  If our event is the &#039;&#039;impossible event&#039;&#039; &amp;lt;math&amp;gt;\varnothing&amp;lt;/math&amp;gt;, we know &amp;lt;math&amp;gt;N_{\varnothing}=0&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; P(\varnothing) = 0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; are &#039;&#039;disjoint events&#039;&#039;, then whenever event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; is observed, then it is impossible for event &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; to be observed simultaneously.  Then&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;N(A\cup B) = N(A) + N(B)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Given our definition of probability, we can arrive at the following:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A\cup B) = P(A) + P(B)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At this point it&#039;s worth remembering that all events are not disjoint events.  I was originally confused by events and outcomes, and this was the source of many misunderstandings.  For events that are not disjoint, we end up with the following probability definition.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; P(A\cup B) = P(A) + P(B) - P(A\cap B)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
How can we see this from example?  Well, let&#039;s consider drawing from a deck of cards.  I&#039;ll define two &#039;&#039;events&#039;&#039;: &amp;quot;drawing a Queen&amp;quot;, and &amp;quot;drawing a Spade&amp;quot;.&lt;/div&gt;</summary>
		<author><name>69.118.80.7</name></author>
	</entry>
	<entry>
		<id>https://ideawaza.com/index.php?title=Introduction_to_Statistics&amp;diff=17022</id>
		<title>Introduction to Statistics</title>
		<link rel="alternate" type="text/html" href="https://ideawaza.com/index.php?title=Introduction_to_Statistics&amp;diff=17022"/>
		<updated>2005-06-28T20:54:30Z</updated>

		<summary type="html">&lt;p&gt;69.118.80.7: /* Probability */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Experiments, Outcomes and Events ==&lt;br /&gt;
&lt;br /&gt;
The easiest way to think of probability is in terms of experiments and their potential outcomes.  Many examples can be drawn from everyday experience:  On the drive home from work, you can encounter a flat tire, or have an uneventful drive; the outcome of an election can include either a win by candidate A, B, or C, or a runoff.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Definition:&#039;&#039;&#039; The entire collection of possible outcomes from an experiment is termed the &#039;&#039;sample space&#039;&#039;, indicated as &#039;&#039;&#039;&amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The simplest (albeit uninteresting) example would be an experiment with only one possible outcome, say &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  If we remember our set theory from elementary school, we can expressed the sample space as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega = \{ A \} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A more interesting example is the result of rolling a six sided dice.  The sample space for this experiment is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega = \{ 1,2,3,4,5,6 \}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We may be interested in &#039;&#039;events&#039;&#039; in an experiment.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Definition:&#039;&#039;&#039; An &#039;&#039;event&#039;&#039; is some subset of outcomes from the &#039;&#039;sample space&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In the dice example, events of interest might include&amp;lt;br&amp;gt;&lt;br /&gt;
a) the outcome is an even number&amp;lt;br&amp;gt;&lt;br /&gt;
b) the outcome is less than three&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These events can be expressed in terms of the possible outcomes from the experiment: &amp;lt;br&amp;gt;&lt;br /&gt;
a) : &amp;lt;math&amp;gt; \{2,4,6\} &amp;lt;/math&amp;gt; b) &amp;lt;math&amp;gt; \{ 1,2 \}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can borrow definitions from set theory to express events in terms of outcomes.  Here is a refresher of some terminology, and some new terms that will be important later: &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \cup &amp;lt;/math&amp;gt; represents the Union of two events&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:[http://en.wikipedia.org/wiki/Image:Venn_A_union_B.png]]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \cap &amp;lt;/math&amp;gt; represents the Interection of two events&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:[http://en.wikipedia.org/wiki/Image:Venn_A_intersect_B.png]]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\{\cdots\}^{c}&amp;lt;/math&amp;gt; represents the complement of an event.  For instance, &amp;quot;the outcome is an even number&amp;quot; is the complement of &amp;quot;the outcome is an odd number&amp;quot; in the dice example.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\varnothing&amp;lt;/math&amp;gt; or &amp;lt;math&amp;gt;\{\}&amp;lt;/math&amp;gt; represent an &#039;&#039;impossible event&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt; represents a &#039;&#039;certain event&#039;&#039; &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; are called &#039;&#039;disjoint events&#039;&#039; if &amp;lt;math&amp;gt;A\cap B = \varnothing&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Probability ==&lt;br /&gt;
Now that we know what events are, we should think a bit about a way to express the likelihood of an event occuring.  The classical definition of probability comes from the following.  If we can perform our experiment over and over in a way that is repeatable, we can count the number of times that the experiment gives rise to event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  We also keep track of the number of times that we perform the same experiment.  If we repeat the experiment a large enough number of times, we can express the probability of event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; as follows:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A) = \frac{N_{A}}{N} &amp;lt;/math&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;N_{A}&amp;lt;/math&amp;gt; is the number of times event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; occurred, and &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; is the number of times the experiment was repeated.  As &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; approaches infinity, the fraction above approaches the true probability of the event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  The value of &amp;lt;math&amp;gt;P(A)&amp;lt;/math&amp;gt; is clearly between 0 and 1.  If our event is the &#039;&#039;certain event&#039;&#039; &amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt;, then for each time we perform the experiment, the event &amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt; is observed; &amp;lt;math&amp;gt;N_{\Omega} = N&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;P(\Omega)=1&amp;lt;/math&amp;gt;.  If our event is the &#039;&#039;impossible event&#039;&#039; &amp;lt;math&amp;gt;\varnothing&amp;lt;/math&amp;gt;, we know &amp;lt;math&amp;gt;N_{\varnothing}=0&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; P(\varnothing) = 0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; are &#039;&#039;disjoint events&#039;&#039;, then whenever event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; is observed, then it is impossible for event &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; to be observed simultaneously.  Then&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;N(A\cup B) = N(A) + N(B)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Given our definition of probability, we can arrive at the following:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A\cup B) = P(A) + P(B)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At this point it&#039;s worth remembering that all events are not disjoint events.  I was originally confused by events and outcomes, and this was the source of many misunderstandings.  For events that are not disjoint, we end up with the following probability definition.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; P(A\cup B) = P(A) + P(B) - P(A\cap B)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
How can we see this from example?  Well, let&#039;s consider drawing from a deck of cards.  I&#039;ll define two &#039;&#039;events&#039;&#039;: &amp;quot;drawing a Queen&amp;quot;, and &amp;quot;drawing a Spade&amp;quot;.&lt;/div&gt;</summary>
		<author><name>69.118.80.7</name></author>
	</entry>
	<entry>
		<id>https://ideawaza.com/index.php?title=Introduction_to_Statistics&amp;diff=17021</id>
		<title>Introduction to Statistics</title>
		<link rel="alternate" type="text/html" href="https://ideawaza.com/index.php?title=Introduction_to_Statistics&amp;diff=17021"/>
		<updated>2005-06-28T20:53:36Z</updated>

		<summary type="html">&lt;p&gt;69.118.80.7: /* Probability */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Experiments, Outcomes and Events ==&lt;br /&gt;
&lt;br /&gt;
The easiest way to think of probability is in terms of experiments and their potential outcomes.  Many examples can be drawn from everyday experience:  On the drive home from work, you can encounter a flat tire, or have an uneventful drive; the outcome of an election can include either a win by candidate A, B, or C, or a runoff.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Definition:&#039;&#039;&#039; The entire collection of possible outcomes from an experiment is termed the &#039;&#039;sample space&#039;&#039;, indicated as &#039;&#039;&#039;&amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The simplest (albeit uninteresting) example would be an experiment with only one possible outcome, say &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  If we remember our set theory from elementary school, we can expressed the sample space as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega = \{ A \} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A more interesting example is the result of rolling a six sided dice.  The sample space for this experiment is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega = \{ 1,2,3,4,5,6 \}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We may be interested in &#039;&#039;events&#039;&#039; in an experiment.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Definition:&#039;&#039;&#039; An &#039;&#039;event&#039;&#039; is some subset of outcomes from the &#039;&#039;sample space&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In the dice example, events of interest might include&amp;lt;br&amp;gt;&lt;br /&gt;
a) the outcome is an even number&amp;lt;br&amp;gt;&lt;br /&gt;
b) the outcome is less than three&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These events can be expressed in terms of the possible outcomes from the experiment: &amp;lt;br&amp;gt;&lt;br /&gt;
a) : &amp;lt;math&amp;gt; \{2,4,6\} &amp;lt;/math&amp;gt; b) &amp;lt;math&amp;gt; \{ 1,2 \}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can borrow definitions from set theory to express events in terms of outcomes.  Here is a refresher of some terminology, and some new terms that will be important later: &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \cup &amp;lt;/math&amp;gt; represents the Union of two events&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:[http://en.wikipedia.org/wiki/Image:Venn_A_union_B.png]]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \cap &amp;lt;/math&amp;gt; represents the Interection of two events&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:[http://en.wikipedia.org/wiki/Image:Venn_A_intersect_B.png]]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\{\cdots\}^{c}&amp;lt;/math&amp;gt; represents the complement of an event.  For instance, &amp;quot;the outcome is an even number&amp;quot; is the complement of &amp;quot;the outcome is an odd number&amp;quot; in the dice example.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\varnothing&amp;lt;/math&amp;gt; or &amp;lt;math&amp;gt;\{\}&amp;lt;/math&amp;gt; represent an &#039;&#039;impossible event&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt; represents a &#039;&#039;certain event&#039;&#039; &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; are called &#039;&#039;disjoint events&#039;&#039; if &amp;lt;math&amp;gt;A\cap B = \varnothing&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Probability ==&lt;br /&gt;
Now that we know what events are, we should think a bit about a way to express the likelihood of an event occuring.  The classical definition of probability comes from the following.  If we can perform our experiment over and over in a way that is repeatable, we can count the number of times that the experiment gives rise to event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  We also keep track of the number of times that we perform the same experiment.  If we repeat the experiment a large enough number of times, we can express the probability of event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; as follows:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A) = \frac{N_{A}}{N} &amp;lt;/math&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;N_{A}&amp;lt;/math&amp;gt; is the number of times event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; occurred, and &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; is the number of times the experiment was repeated.  As &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; approaches infinity, the fraction above approaches the true probability of the event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  The value of &amp;lt;math&amp;gt;P(A)&amp;lt;/math&amp;gt; is clearly between 0 and 1.  If our event is the &#039;&#039;certain event&#039;&#039; &amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt;, then for each time we perform the experiment, the event &amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt; is observed; &amp;lt;math&amp;gt;N_{\Omega} = N&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;P(\Omega)=1&amp;lt;/math&amp;gt;.  If our event is the &#039;&#039;impossible event&#039;&#039; &amp;lt;math&amp;gt;\varnothing&amp;lt;/math&amp;gt;, we know &amp;lt;math&amp;gt;N_{\varnothing}=0&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; P(\varnothing) = 0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; are &#039;&#039;disjoint events&#039;&#039;, then whenever event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; is observed, then it is impossible for event &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; to be observed simultaneously.  Then&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;N(A\cup B) = N(A) + N(B)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Given our definition of probability, we can arrive at the following:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A\cup B) = P(A) + P(B)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At this point it&#039;s worth remembering that all events are not disjoint events.  I was originally confused by events and outcomes, and this was the source of many misunderstandings.  For events that are not disjoint, we end up with the following probability definition.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; P(A\cup B) = P(A) + P(B) - P(A\cap B)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
How can we see this from example?  Well, let&#039;s consider drawing from a deck of cards as an example.  I&#039;ll define two &#039;&#039;events&#039;&#039;: &amp;quot;drawing a Queen&amp;quot;, and &amp;quot;drawing a Spade&amp;quot;.&lt;/div&gt;</summary>
		<author><name>69.118.80.7</name></author>
	</entry>
	<entry>
		<id>https://ideawaza.com/index.php?title=Introduction_to_Statistics&amp;diff=17020</id>
		<title>Introduction to Statistics</title>
		<link rel="alternate" type="text/html" href="https://ideawaza.com/index.php?title=Introduction_to_Statistics&amp;diff=17020"/>
		<updated>2005-06-28T20:36:19Z</updated>

		<summary type="html">&lt;p&gt;69.118.80.7: /* Probability */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Experiments, Outcomes and Events ==&lt;br /&gt;
&lt;br /&gt;
The easiest way to think of probability is in terms of experiments and their potential outcomes.  Many examples can be drawn from everyday experience:  On the drive home from work, you can encounter a flat tire, or have an uneventful drive; the outcome of an election can include either a win by candidate A, B, or C, or a runoff.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Definition:&#039;&#039;&#039; The entire collection of possible outcomes from an experiment is termed the &#039;&#039;sample space&#039;&#039;, indicated as &#039;&#039;&#039;&amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The simplest (albeit uninteresting) example would be an experiment with only one possible outcome, say &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  If we remember our set theory from elementary school, we can expressed the sample space as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega = \{ A \} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A more interesting example is the result of rolling a six sided dice.  The sample space for this experiment is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega = \{ 1,2,3,4,5,6 \}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We may be interested in &#039;&#039;events&#039;&#039; in an experiment.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Definition:&#039;&#039;&#039; An &#039;&#039;event&#039;&#039; is some subset of outcomes from the &#039;&#039;sample space&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In the dice example, events of interest might include&amp;lt;br&amp;gt;&lt;br /&gt;
a) the outcome is an even number&amp;lt;br&amp;gt;&lt;br /&gt;
b) the outcome is less than three&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These events can be expressed in terms of the possible outcomes from the experiment: &amp;lt;br&amp;gt;&lt;br /&gt;
a) : &amp;lt;math&amp;gt; \{2,4,6\} &amp;lt;/math&amp;gt; b) &amp;lt;math&amp;gt; \{ 1,2 \}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can borrow definitions from set theory to express events in terms of outcomes.  Here is a refresher of some terminology, and some new terms that will be important later: &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \cup &amp;lt;/math&amp;gt; represents the Union of two events&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:[http://en.wikipedia.org/wiki/Image:Venn_A_union_B.png]]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \cap &amp;lt;/math&amp;gt; represents the Interection of two events&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:[http://en.wikipedia.org/wiki/Image:Venn_A_intersect_B.png]]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\{\cdots\}^{c}&amp;lt;/math&amp;gt; represents the complement of an event.  For instance, &amp;quot;the outcome is an even number&amp;quot; is the complement of &amp;quot;the outcome is an odd number&amp;quot; in the dice example.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\varnothing&amp;lt;/math&amp;gt; or &amp;lt;math&amp;gt;\{\}&amp;lt;/math&amp;gt; represent an &#039;&#039;impossible event&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt; represents a &#039;&#039;certain event&#039;&#039; &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; are called &#039;&#039;disjoint events&#039;&#039; if &amp;lt;math&amp;gt;A\cap B = \varnothing&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Probability ==&lt;br /&gt;
Now that we know what events are, we should think a bit about a way to express the likelihood of an event occuring.  The classical definition of probability comes from the following.  If we can perform our experiment over and over in a way that is repeatable, we can count the number of times that the experiment gives rise to event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  We also keep track of the number of times that we perform the same experiment.  If we repeat the experiment a large enough number of times, we can express the probability of event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; as follows:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A) = \frac{N_{A}}{N} &amp;lt;/math&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;N_{A}&amp;lt;/math&amp;gt; is the number of times event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; occurred, and &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; is the number of times the experiment was repeated.  As &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; approaches infinity, the fraction above approaches the true probability of the event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  The value of &amp;lt;math&amp;gt;P(A)&amp;lt;/math&amp;gt; is clearly between 0 and 1.  If our event is the &#039;&#039;certain event&#039;&#039; &amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt;, then for each time we perform the experiment, the event &amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt; is observed; &amp;lt;math&amp;gt;N_{\Omega} = N&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;P(\Omega)=1&amp;lt;/math&amp;gt;.  If our event is the &#039;&#039;impossible event&#039;&#039; &amp;lt;math&amp;gt;\varnothing&amp;lt;/math&amp;gt;, we know &amp;lt;math&amp;gt;N_{\varnothing}=0&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; P(\varnothing) = 0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; are &#039;&#039;disjoint events&#039;&#039;, then whenever event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; is observed, then it is impossible for event &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; to be observed simultaneously.  Then&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;N(A\cup B) = N(A) + N(B)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Given our definition of probability, we can arrive at the following:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A\cup B) = P(A) + P(B)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>69.118.80.7</name></author>
	</entry>
	<entry>
		<id>https://ideawaza.com/index.php?title=Introduction_to_Statistics&amp;diff=17019</id>
		<title>Introduction to Statistics</title>
		<link rel="alternate" type="text/html" href="https://ideawaza.com/index.php?title=Introduction_to_Statistics&amp;diff=17019"/>
		<updated>2005-06-28T20:23:40Z</updated>

		<summary type="html">&lt;p&gt;69.118.80.7: /* Probability */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Experiments, Outcomes and Events ==&lt;br /&gt;
&lt;br /&gt;
The easiest way to think of probability is in terms of experiments and their potential outcomes.  Many examples can be drawn from everyday experience:  On the drive home from work, you can encounter a flat tire, or have an uneventful drive; the outcome of an election can include either a win by candidate A, B, or C, or a runoff.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Definition:&#039;&#039;&#039; The entire collection of possible outcomes from an experiment is termed the &#039;&#039;sample space&#039;&#039;, indicated as &#039;&#039;&#039;&amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The simplest (albeit uninteresting) example would be an experiment with only one possible outcome, say &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  If we remember our set theory from elementary school, we can expressed the sample space as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega = \{ A \} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A more interesting example is the result of rolling a six sided dice.  The sample space for this experiment is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega = \{ 1,2,3,4,5,6 \}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We may be interested in &#039;&#039;events&#039;&#039; in an experiment.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Definition:&#039;&#039;&#039; An &#039;&#039;event&#039;&#039; is some subset of outcomes from the &#039;&#039;sample space&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In the dice example, events of interest might include&amp;lt;br&amp;gt;&lt;br /&gt;
a) the outcome is an even number&amp;lt;br&amp;gt;&lt;br /&gt;
b) the outcome is less than three&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These events can be expressed in terms of the possible outcomes from the experiment: &amp;lt;br&amp;gt;&lt;br /&gt;
a) : &amp;lt;math&amp;gt; \{2,4,6\} &amp;lt;/math&amp;gt; b) &amp;lt;math&amp;gt; \{ 1,2 \}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can borrow definitions from set theory to express events in terms of outcomes.  Here is a refresher of some terminology, and some new terms that will be important later: &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \cup &amp;lt;/math&amp;gt; represents the Union of two events&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:[http://en.wikipedia.org/wiki/Image:Venn_A_union_B.png]]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \cap &amp;lt;/math&amp;gt; represents the Interection of two events&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:[http://en.wikipedia.org/wiki/Image:Venn_A_intersect_B.png]]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\{\cdots\}^{c}&amp;lt;/math&amp;gt; represents the complement of an event.  For instance, &amp;quot;the outcome is an even number&amp;quot; is the complement of &amp;quot;the outcome is an odd number&amp;quot; in the dice example.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\varnothing&amp;lt;/math&amp;gt; or &amp;lt;math&amp;gt;\{\}&amp;lt;/math&amp;gt; represent an &#039;&#039;impossible event&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt; represents a &#039;&#039;certain event&#039;&#039; &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; are called &#039;&#039;disjoint events&#039;&#039; if &amp;lt;math&amp;gt;A\cap B = \varnothing&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Probability ==&lt;br /&gt;
Now that we know what events are, we should think a bit about a way to express the likelihood of an event occuring.  The classical definition of probability comes from the following.  If we can perform our experiment over and over in a way that is repeatable, we can count the number of times that the experiment gives rise to event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  We also keep track of the number of times that we perform the same experiment.  If we repeat the experiment a large enough number of times, we can express the probability of event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; as follows:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A) = \frac{N_{A}}{N} &amp;lt;/math&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;N_{A}&amp;lt;/math&amp;gt; is the number of times event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; occurred, and &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; is the number of times the experiment was repeated.  As &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; approaches infinity, the fraction above approaches the true probability of the event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  The value of &amp;lt;math&amp;gt;P(A)&amp;lt;/math&amp;gt; is clearly between 0 and 1.  If our event is the &#039;&#039;certain event&#039;&#039; &amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt;, then for each time we perform the experiment, the event &amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt; is observed; &amp;lt;math&amp;gt;N_{\Omega} = N&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;P(\Omega)=1&amp;lt;/math&amp;gt;.  If our event is the &#039;&#039;impossible event&#039;&#039; &amp;lt;math&amp;gt;\varnothing&amp;lt;/math&amp;gt;, we know &amp;lt;math&amp;gt;N_{\varnothing}=0&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; P(\varnothing) = 0&amp;lt;/math&amp;gt;.&lt;/div&gt;</summary>
		<author><name>69.118.80.7</name></author>
	</entry>
	<entry>
		<id>https://ideawaza.com/index.php?title=Introduction_to_Statistics&amp;diff=17018</id>
		<title>Introduction to Statistics</title>
		<link rel="alternate" type="text/html" href="https://ideawaza.com/index.php?title=Introduction_to_Statistics&amp;diff=17018"/>
		<updated>2005-06-28T20:17:57Z</updated>

		<summary type="html">&lt;p&gt;69.118.80.7: /* Probability */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Experiments, Outcomes and Events ==&lt;br /&gt;
&lt;br /&gt;
The easiest way to think of probability is in terms of experiments and their potential outcomes.  Many examples can be drawn from everyday experience:  On the drive home from work, you can encounter a flat tire, or have an uneventful drive; the outcome of an election can include either a win by candidate A, B, or C, or a runoff.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Definition:&#039;&#039;&#039; The entire collection of possible outcomes from an experiment is termed the &#039;&#039;sample space&#039;&#039;, indicated as &#039;&#039;&#039;&amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The simplest (albeit uninteresting) example would be an experiment with only one possible outcome, say &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  If we remember our set theory from elementary school, we can expressed the sample space as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega = \{ A \} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A more interesting example is the result of rolling a six sided dice.  The sample space for this experiment is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega = \{ 1,2,3,4,5,6 \}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We may be interested in &#039;&#039;events&#039;&#039; in an experiment.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Definition:&#039;&#039;&#039; An &#039;&#039;event&#039;&#039; is some subset of outcomes from the &#039;&#039;sample space&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In the dice example, events of interest might include&amp;lt;br&amp;gt;&lt;br /&gt;
a) the outcome is an even number&amp;lt;br&amp;gt;&lt;br /&gt;
b) the outcome is less than three&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These events can be expressed in terms of the possible outcomes from the experiment: &amp;lt;br&amp;gt;&lt;br /&gt;
a) : &amp;lt;math&amp;gt; \{2,4,6\} &amp;lt;/math&amp;gt; b) &amp;lt;math&amp;gt; \{ 1,2 \}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can borrow definitions from set theory to express events in terms of outcomes.  Here is a refresher of some terminology, and some new terms that will be important later: &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \cup &amp;lt;/math&amp;gt; represents the Union of two events&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:[http://en.wikipedia.org/wiki/Image:Venn_A_union_B.png]]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \cap &amp;lt;/math&amp;gt; represents the Interection of two events&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:[http://en.wikipedia.org/wiki/Image:Venn_A_intersect_B.png]]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\{\cdots\}^{c}&amp;lt;/math&amp;gt; represents the complement of an event.  For instance, &amp;quot;the outcome is an even number&amp;quot; is the complement of &amp;quot;the outcome is an odd number&amp;quot; in the dice example.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\varnothing&amp;lt;/math&amp;gt; or &amp;lt;math&amp;gt;\{\}&amp;lt;/math&amp;gt; represent an &#039;&#039;impossible event&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt; represents a &#039;&#039;certain event&#039;&#039; &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; are called &#039;&#039;disjoint events&#039;&#039; if &amp;lt;math&amp;gt;A\cap B = \varnothing&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Probability ==&lt;br /&gt;
Now that we know what events are, we should think a bit about a way to express the likelihood of an event occuring.  The classical definition of probability comes from the following.  If we can perform our experiment over and over in a way that is repeatable, we can count the number of times that the experiment gives rise to event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  We also keep track of the number of times that we perform the same experiment.  If we repeat the experiment a large enough number of times, we can express the probability of event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; as follows:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A) = \frac{N_{A}}{N} &amp;lt;/math&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;N_{A}&amp;lt;/math&amp;gt; is the number of times event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; occurred, and &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; is the number of times the experiment was repeated.  As &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; approaches infinity, the fraction above approaches the true probability of the event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  The value of &amp;lt;math&amp;gt;P(A)&amp;lt;/math&amp;gt; is clearly between 0 and 1.  If our event is the &#039;&#039;certain event&#039;&#039; &amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt;, then for each time we perform the experiment, the event &amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt; is observed; &amp;lt;math&amp;gt;N_{\Omega} = N&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;P(\Omega)=1&amp;lt;/math&amp;gt;.  If our event is the &#039;&#039;impossible event&#039;&#039; &amp;lt;math&amp;gt;\varnoint&amp;lt;/math&amp;gt;,&lt;/div&gt;</summary>
		<author><name>69.118.80.7</name></author>
	</entry>
	<entry>
		<id>https://ideawaza.com/index.php?title=Introduction_to_Statistics&amp;diff=17017</id>
		<title>Introduction to Statistics</title>
		<link rel="alternate" type="text/html" href="https://ideawaza.com/index.php?title=Introduction_to_Statistics&amp;diff=17017"/>
		<updated>2005-06-28T20:16:01Z</updated>

		<summary type="html">&lt;p&gt;69.118.80.7: /* Probability */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Experiments, Outcomes and Events ==&lt;br /&gt;
&lt;br /&gt;
The easiest way to think of probability is in terms of experiments and their potential outcomes.  Many examples can be drawn from everyday experience:  On the drive home from work, you can encounter a flat tire, or have an uneventful drive; the outcome of an election can include either a win by candidate A, B, or C, or a runoff.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Definition:&#039;&#039;&#039; The entire collection of possible outcomes from an experiment is termed the &#039;&#039;sample space&#039;&#039;, indicated as &#039;&#039;&#039;&amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The simplest (albeit uninteresting) example would be an experiment with only one possible outcome, say &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  If we remember our set theory from elementary school, we can expressed the sample space as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega = \{ A \} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A more interesting example is the result of rolling a six sided dice.  The sample space for this experiment is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega = \{ 1,2,3,4,5,6 \}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We may be interested in &#039;&#039;events&#039;&#039; in an experiment.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Definition:&#039;&#039;&#039; An &#039;&#039;event&#039;&#039; is some subset of outcomes from the &#039;&#039;sample space&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In the dice example, events of interest might include&amp;lt;br&amp;gt;&lt;br /&gt;
a) the outcome is an even number&amp;lt;br&amp;gt;&lt;br /&gt;
b) the outcome is less than three&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These events can be expressed in terms of the possible outcomes from the experiment: &amp;lt;br&amp;gt;&lt;br /&gt;
a) : &amp;lt;math&amp;gt; \{2,4,6\} &amp;lt;/math&amp;gt; b) &amp;lt;math&amp;gt; \{ 1,2 \}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can borrow definitions from set theory to express events in terms of outcomes.  Here is a refresher of some terminology, and some new terms that will be important later: &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \cup &amp;lt;/math&amp;gt; represents the Union of two events&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:[http://en.wikipedia.org/wiki/Image:Venn_A_union_B.png]]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \cap &amp;lt;/math&amp;gt; represents the Interection of two events&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:[http://en.wikipedia.org/wiki/Image:Venn_A_intersect_B.png]]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\{\cdots\}^{c}&amp;lt;/math&amp;gt; represents the complement of an event.  For instance, &amp;quot;the outcome is an even number&amp;quot; is the complement of &amp;quot;the outcome is an odd number&amp;quot; in the dice example.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\varnothing&amp;lt;/math&amp;gt; or &amp;lt;math&amp;gt;\{\}&amp;lt;/math&amp;gt; represent an &#039;&#039;impossible event&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt; represents a &#039;&#039;certain event&#039;&#039; &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; are called &#039;&#039;disjoint events&#039;&#039; if &amp;lt;math&amp;gt;A\cap B = \varnothing&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Probability ==&lt;br /&gt;
Now that we know what events are, we should think a bit about a way to express the likelihood of an event occuring.  The classical definition of probability comes from the following.  If we can perform our experiment over and over in a way that is repeatable, we can count the number of times that the experiment gives rise to event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  We also keep track of the number of times that we perform the same experiment.  If we repeat the experiment a large enough number of times, we can express the probability of event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; as follows:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A) = \frac{N_{A}}{N} &amp;lt;/math&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;N_{A}&amp;lt;/math&amp;gt; is the number of times event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; occurred, and &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; is the number of times the experiment was repeated.  As &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; approaches infinity, the fraction above approaches the true probability of the event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  The value of &amp;lt;math&amp;gt;P(A)&amp;lt;/math&amp;gt; is clearly between 0 and 1.  If our event is the &#039;&#039;certain event&#039;&#039; &amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt;, then for each time we perform the experiment, the event &amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt; is observed; &amp;lt;math&amp;gt;N_{\Omega} = N&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;P(\Omega)=1&amp;lt;/math&amp;gt;.&lt;/div&gt;</summary>
		<author><name>69.118.80.7</name></author>
	</entry>
	<entry>
		<id>https://ideawaza.com/index.php?title=Introduction_to_Statistics&amp;diff=17016</id>
		<title>Introduction to Statistics</title>
		<link rel="alternate" type="text/html" href="https://ideawaza.com/index.php?title=Introduction_to_Statistics&amp;diff=17016"/>
		<updated>2005-06-28T19:54:57Z</updated>

		<summary type="html">&lt;p&gt;69.118.80.7: /* Probability */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Experiments, Outcomes and Events ==&lt;br /&gt;
&lt;br /&gt;
The easiest way to think of probability is in terms of experiments and their potential outcomes.  Many examples can be drawn from everyday experience:  On the drive home from work, you can encounter a flat tire, or have an uneventful drive; the outcome of an election can include either a win by candidate A, B, or C, or a runoff.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Definition:&#039;&#039;&#039; The entire collection of possible outcomes from an experiment is termed the &#039;&#039;sample space&#039;&#039;, indicated as &#039;&#039;&#039;&amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The simplest (albeit uninteresting) example would be an experiment with only one possible outcome, say &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  If we remember our set theory from elementary school, we can expressed the sample space as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega = \{ A \} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A more interesting example is the result of rolling a six sided dice.  The sample space for this experiment is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega = \{ 1,2,3,4,5,6 \}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We may be interested in &#039;&#039;events&#039;&#039; in an experiment.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Definition:&#039;&#039;&#039; An &#039;&#039;event&#039;&#039; is some subset of outcomes from the &#039;&#039;sample space&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In the dice example, events of interest might include&amp;lt;br&amp;gt;&lt;br /&gt;
a) the outcome is an even number&amp;lt;br&amp;gt;&lt;br /&gt;
b) the outcome is less than three&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These events can be expressed in terms of the possible outcomes from the experiment: &amp;lt;br&amp;gt;&lt;br /&gt;
a) : &amp;lt;math&amp;gt; \{2,4,6\} &amp;lt;/math&amp;gt; b) &amp;lt;math&amp;gt; \{ 1,2 \}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can borrow definitions from set theory to express events in terms of outcomes.  Here is a refresher of some terminology, and some new terms that will be important later: &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \cup &amp;lt;/math&amp;gt; represents the Union of two events&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:[http://en.wikipedia.org/wiki/Image:Venn_A_union_B.png]]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \cap &amp;lt;/math&amp;gt; represents the Interection of two events&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:[http://en.wikipedia.org/wiki/Image:Venn_A_intersect_B.png]]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\{\cdots\}^{c}&amp;lt;/math&amp;gt; represents the complement of an event.  For instance, &amp;quot;the outcome is an even number&amp;quot; is the complement of &amp;quot;the outcome is an odd number&amp;quot; in the dice example.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\varnothing&amp;lt;/math&amp;gt; or &amp;lt;math&amp;gt;\{\}&amp;lt;/math&amp;gt; represent an &#039;&#039;impossible event&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt; represents a &#039;&#039;certain event&#039;&#039; &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; are called &#039;&#039;disjoint events&#039;&#039; if &amp;lt;math&amp;gt;A\cap B = \varnothing&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Probability ==&lt;br /&gt;
Now that we know what events are, we should think a bit about a way to express the likelihood of an event occuring.  The classical definition of probability comes from the following.  If we can perform our experiment over and over in a way that is repeatable, we can count the number of times that the experiment gives rise to event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  We also keep track of the number of times that we perform the same experiment.  If we repeat the experiment a large enough number of times, we can express the probability of event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; as follows:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A) = \frac{N_{A}}{N} &amp;lt;/math&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;N_{A}&amp;lt;/math&amp;gt; is the number of times event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; occurred, and &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; is the number of times the experiment was repeated.  As &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; approaches infinity, the fraction above approaches the true probability of the event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.&lt;/div&gt;</summary>
		<author><name>69.118.80.7</name></author>
	</entry>
	<entry>
		<id>https://ideawaza.com/index.php?title=Introduction_to_Statistics&amp;diff=17015</id>
		<title>Introduction to Statistics</title>
		<link rel="alternate" type="text/html" href="https://ideawaza.com/index.php?title=Introduction_to_Statistics&amp;diff=17015"/>
		<updated>2005-06-28T19:52:37Z</updated>

		<summary type="html">&lt;p&gt;69.118.80.7: /* Experiments, Outcomes and Events */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Experiments, Outcomes and Events ==&lt;br /&gt;
&lt;br /&gt;
The easiest way to think of probability is in terms of experiments and their potential outcomes.  Many examples can be drawn from everyday experience:  On the drive home from work, you can encounter a flat tire, or have an uneventful drive; the outcome of an election can include either a win by candidate A, B, or C, or a runoff.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Definition:&#039;&#039;&#039; The entire collection of possible outcomes from an experiment is termed the &#039;&#039;sample space&#039;&#039;, indicated as &#039;&#039;&#039;&amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The simplest (albeit uninteresting) example would be an experiment with only one possible outcome, say &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  If we remember our set theory from elementary school, we can expressed the sample space as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega = \{ A \} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A more interesting example is the result of rolling a six sided dice.  The sample space for this experiment is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega = \{ 1,2,3,4,5,6 \}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We may be interested in &#039;&#039;events&#039;&#039; in an experiment.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Definition:&#039;&#039;&#039; An &#039;&#039;event&#039;&#039; is some subset of outcomes from the &#039;&#039;sample space&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In the dice example, events of interest might include&amp;lt;br&amp;gt;&lt;br /&gt;
a) the outcome is an even number&amp;lt;br&amp;gt;&lt;br /&gt;
b) the outcome is less than three&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These events can be expressed in terms of the possible outcomes from the experiment: &amp;lt;br&amp;gt;&lt;br /&gt;
a) : &amp;lt;math&amp;gt; \{2,4,6\} &amp;lt;/math&amp;gt; b) &amp;lt;math&amp;gt; \{ 1,2 \}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can borrow definitions from set theory to express events in terms of outcomes.  Here is a refresher of some terminology, and some new terms that will be important later: &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \cup &amp;lt;/math&amp;gt; represents the Union of two events&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:[http://en.wikipedia.org/wiki/Image:Venn_A_union_B.png]]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \cap &amp;lt;/math&amp;gt; represents the Interection of two events&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:[http://en.wikipedia.org/wiki/Image:Venn_A_intersect_B.png]]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\{\cdots\}^{c}&amp;lt;/math&amp;gt; represents the complement of an event.  For instance, &amp;quot;the outcome is an even number&amp;quot; is the complement of &amp;quot;the outcome is an odd number&amp;quot; in the dice example.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\varnothing&amp;lt;/math&amp;gt; or &amp;lt;math&amp;gt;\{\}&amp;lt;/math&amp;gt; represent an &#039;&#039;impossible event&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt; represents a &#039;&#039;certain event&#039;&#039; &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; are called &#039;&#039;disjoint events&#039;&#039; if &amp;lt;math&amp;gt;A\cap B = \varnothing&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Probability ==&lt;br /&gt;
Now that we know what events are, we should think a bit about a way to express the likelihood of an event occuring.  The classical definition of probability comes from the following.  If we can perform our experiment over and over in a way that is repeatable, we can count the number of times that the experiment gives rise to event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  We also keep track of the number of times that we perform the same experiment.  If we repeat the experiment a large enough number of times, we can express the probability of event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; as follows:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A) = \frac{N_{A}}{N} &amp;lt;/math&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;N_{A}&amp;lt;/math&amp;gt; is the number of times event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; occurred, and &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; is the number of times the experiment was repeated.&lt;/div&gt;</summary>
		<author><name>69.118.80.7</name></author>
	</entry>
	<entry>
		<id>https://ideawaza.com/index.php?title=Introduction_to_Statistics&amp;diff=17014</id>
		<title>Introduction to Statistics</title>
		<link rel="alternate" type="text/html" href="https://ideawaza.com/index.php?title=Introduction_to_Statistics&amp;diff=17014"/>
		<updated>2005-06-28T19:46:13Z</updated>

		<summary type="html">&lt;p&gt;69.118.80.7: /* Fields */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Experiments, Outcomes and Events ==&lt;br /&gt;
&lt;br /&gt;
The easiest way to think of probability is in terms of experiments and their potential outcomes.  Many examples can be drawn from everyday experience:  On the drive home from work, you can encounter a flat tire, or have an uneventful drive; the outcome of an election can include either a win by candidate A, B, or C, or a runoff.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Definition:&#039;&#039;&#039; The entire collection of possible outcomes from an experiment is termed the &#039;&#039;sample space&#039;&#039;, indicated as &#039;&#039;&#039;&amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The simplest (albeit uninteresting) example would be an experiment with only one possible outcome, say &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  If we remember our set theory from elementary school, we can expressed the sample space as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega = \{ A \} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A more interesting example is the result of rolling a six sided dice.  The sample space for this experiment is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega = \{ 1,2,3,4,5,6 \}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We may be interested in &#039;&#039;events&#039;&#039; in an experiment.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Definition:&#039;&#039;&#039; An &#039;&#039;event&#039;&#039; is some subset of outcomes from the &#039;&#039;sample space&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In the dice example, events of interest might include&amp;lt;br&amp;gt;&lt;br /&gt;
a) the outcome is an even number&amp;lt;br&amp;gt;&lt;br /&gt;
b) the outcome is less than three&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These events can be expressed in terms of the possible outcomes from the experiment: &amp;lt;br&amp;gt;&lt;br /&gt;
a) : &amp;lt;math&amp;gt; \{2,4,6\} &amp;lt;/math&amp;gt; b) &amp;lt;math&amp;gt; \{ 1,2 \}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can borrow definitions from set theory to express events in terms of outcomes.  Here is a refresher of the terminology: &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \cup &amp;lt;/math&amp;gt; represents the Union of two events&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:[http://en.wikipedia.org/wiki/Image:Venn_A_union_B.png]]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \cap &amp;lt;/math&amp;gt; represents the Interection of two events&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:[http://en.wikipedia.org/wiki/Image:Venn_A_intersect_B.png]]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\{\cdots\}^{c}&amp;lt;/math&amp;gt; represents the complement of an event.  For instance, &amp;quot;the outcome is an even number&amp;quot; is the complement of &amp;quot;the outcome is an odd number&amp;quot; in the dice example.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\varnothing&amp;lt;/math&amp;gt; or &amp;lt;math&amp;gt;\{\}&amp;lt;/math&amp;gt; represent an &#039;&#039;impossible event&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt; represents a certain event &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Probability ==&lt;br /&gt;
Now that we know what events are, we should think a bit about a way to express the likelihood of an event occuring.  The classical definition of probability comes from the following.  If we can perform our experiment over and over in a way that is repeatable, we can count the number of times that the experiment gives rise to event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  We also keep track of the number of times that we perform the same experiment.  If we repeat the experiment a large enough number of times, we can express the probability of event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; as follows:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A) = \frac{N_{A}}{N} &amp;lt;/math&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;N_{A}&amp;lt;/math&amp;gt; is the number of times event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; occurred, and &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; is the number of times the experiment was repeated.&lt;/div&gt;</summary>
		<author><name>69.118.80.7</name></author>
	</entry>
	<entry>
		<id>https://ideawaza.com/index.php?title=Introduction_to_Statistics&amp;diff=17013</id>
		<title>Introduction to Statistics</title>
		<link rel="alternate" type="text/html" href="https://ideawaza.com/index.php?title=Introduction_to_Statistics&amp;diff=17013"/>
		<updated>2005-06-28T19:45:39Z</updated>

		<summary type="html">&lt;p&gt;69.118.80.7: /* Experiments, Outcomes and Events */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Experiments, Outcomes and Events ==&lt;br /&gt;
&lt;br /&gt;
The easiest way to think of probability is in terms of experiments and their potential outcomes.  Many examples can be drawn from everyday experience:  On the drive home from work, you can encounter a flat tire, or have an uneventful drive; the outcome of an election can include either a win by candidate A, B, or C, or a runoff.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Definition:&#039;&#039;&#039; The entire collection of possible outcomes from an experiment is termed the &#039;&#039;sample space&#039;&#039;, indicated as &#039;&#039;&#039;&amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The simplest (albeit uninteresting) example would be an experiment with only one possible outcome, say &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  If we remember our set theory from elementary school, we can expressed the sample space as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega = \{ A \} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A more interesting example is the result of rolling a six sided dice.  The sample space for this experiment is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega = \{ 1,2,3,4,5,6 \}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We may be interested in &#039;&#039;events&#039;&#039; in an experiment.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Definition:&#039;&#039;&#039; An &#039;&#039;event&#039;&#039; is some subset of outcomes from the &#039;&#039;sample space&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In the dice example, events of interest might include&amp;lt;br&amp;gt;&lt;br /&gt;
a) the outcome is an even number&amp;lt;br&amp;gt;&lt;br /&gt;
b) the outcome is less than three&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These events can be expressed in terms of the possible outcomes from the experiment: &amp;lt;br&amp;gt;&lt;br /&gt;
a) : &amp;lt;math&amp;gt; \{2,4,6\} &amp;lt;/math&amp;gt; b) &amp;lt;math&amp;gt; \{ 1,2 \}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can borrow definitions from set theory to express events in terms of outcomes.  Here is a refresher of the terminology: &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \cup &amp;lt;/math&amp;gt; represents the Union of two events&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:[http://en.wikipedia.org/wiki/Image:Venn_A_union_B.png]]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \cap &amp;lt;/math&amp;gt; represents the Interection of two events&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:[http://en.wikipedia.org/wiki/Image:Venn_A_intersect_B.png]]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\{\cdots\}^{c}&amp;lt;/math&amp;gt; represents the complement of an event.  For instance, &amp;quot;the outcome is an even number&amp;quot; is the complement of &amp;quot;the outcome is an odd number&amp;quot; in the dice example.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\varnothing&amp;lt;/math&amp;gt; or &amp;lt;math&amp;gt;\{\}&amp;lt;/math&amp;gt; represent an &#039;&#039;impossible event&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt; represents a certain event &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Probability ==&lt;br /&gt;
Now that we know what events are, we should think a bit about a way to express the likelihood of an event occuring.  The classical definition of probability comes from the following.  If we can perform our experiment over and over in a way that is repeatable, we can count the number of times that the experiment gives rise to event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  We also keep track of the number of times that we perform the same experiment.  If we repeat the experiment a large enough number of times, we can express the probability of event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; as follows:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;P(A) = \frac{N_{A}}{N} &amp;lt;/math&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;N_{A}&amp;lt;/math&amp;gt; is the number of times event &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; occurred, and &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; is the number of times the experiment was repeated.&lt;br /&gt;
&lt;br /&gt;
= Fields =&lt;/div&gt;</summary>
		<author><name>69.118.80.7</name></author>
	</entry>
	<entry>
		<id>https://ideawaza.com/index.php?title=Introduction_to_Statistics&amp;diff=17012</id>
		<title>Introduction to Statistics</title>
		<link rel="alternate" type="text/html" href="https://ideawaza.com/index.php?title=Introduction_to_Statistics&amp;diff=17012"/>
		<updated>2005-06-28T19:36:43Z</updated>

		<summary type="html">&lt;p&gt;69.118.80.7: /* Experiments, Outcomes and Events */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Experiments, Outcomes and Events ==&lt;br /&gt;
&lt;br /&gt;
The easiest way to think of probability is in terms of experiments and their potential outcomes.  Many examples can be drawn from everyday experience:  On the drive home from work, you can encounter a flat tire, or have an uneventful drive; the outcome of an election can include either a win by candidate A, B, or C, or a runoff.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Definition:&#039;&#039;&#039; The entire collection of possible outcomes from an experiment is termed the &#039;&#039;sample space&#039;&#039;, indicated as &#039;&#039;&#039;&amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The simplest (albeit uninteresting) example would be an experiment with only one possible outcome, say &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  If we remember our set theory from elementary school, we can expressed the sample space as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega = \{ A \} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A more interesting example is the result of rolling a six sided dice.  The sample space for this experiment is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega = \{ 1,2,3,4,5,6 \}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We may be interested in &#039;&#039;events&#039;&#039; in an experiment.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Definition:&#039;&#039;&#039; An &#039;&#039;event&#039;&#039; is some subset of outcomes from the &#039;&#039;sample space&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In the dice example, events of interest might include&amp;lt;br&amp;gt;&lt;br /&gt;
a) the outcome is an even number&amp;lt;br&amp;gt;&lt;br /&gt;
b) the outcome is less than three&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These events can be expressed in terms of the possible outcomes from the experiment: &amp;lt;br&amp;gt;&lt;br /&gt;
a) : &amp;lt;math&amp;gt; \{2,4,6\} &amp;lt;/math&amp;gt; b) &amp;lt;math&amp;gt; \{ 1,2 \}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can borrow definitions from set theory to express events in terms of outcomes.  Here is a refresher of the terminology: &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \cup &amp;lt;/math&amp;gt; represents the Union of two events&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:[http://en.wikipedia.org/wiki/Image:Venn_A_union_B.png]]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \cap &amp;lt;/math&amp;gt; represents the Interection of two events&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:[http://en.wikipedia.org/wiki/Image:Venn_A_intersect_B.png]]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\{\cdots\}^{c}&amp;lt;/math&amp;gt; represents the complement of an event.  For instance, &amp;quot;the outcome is an even number&amp;quot; is the complement of &amp;quot;the outcome is an odd number&amp;quot; in the dice example.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\varnothing&amp;lt;/math&amp;gt; or &amp;lt;math&amp;gt;\{\}&amp;lt;/math&amp;gt; represent an &#039;&#039;impossible event&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt; represents a certain event &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Fields =&lt;/div&gt;</summary>
		<author><name>69.118.80.7</name></author>
	</entry>
	<entry>
		<id>https://ideawaza.com/index.php?title=Introduction_to_Statistics&amp;diff=17011</id>
		<title>Introduction to Statistics</title>
		<link rel="alternate" type="text/html" href="https://ideawaza.com/index.php?title=Introduction_to_Statistics&amp;diff=17011"/>
		<updated>2005-06-28T16:23:00Z</updated>

		<summary type="html">&lt;p&gt;69.118.80.7: /* Experiments, Outcomes and Events */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Experiments, Outcomes and Events ==&lt;br /&gt;
&lt;br /&gt;
The easiest way to think of probability is in terms of experiments and their potential outcomes.  Many examples can be drawn from everyday experience:  On the drive home from work, you can encounter a flat tire, or have an uneventful drive; the outcome of an election can include either a win by candidate A, B, or C, or a runoff.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Definition:&#039;&#039;&#039; The entire collection of possible outcomes from an experiment is termed the &#039;&#039;sample space&#039;&#039;, indicated as &#039;&#039;&#039;&amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The simplest (albeit uninteresting) example would be an experiment with only one possible outcome, say &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  If we remember our set theory from elementary school, we can expressed the sample space as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega = \{ A \} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A more interesting example is the result of rolling a six sided dice.  The sample space for this experiment is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega = \{ 1,2,3,4,5,6 \}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We may be interested in &#039;&#039;events&#039;&#039; in an experiment.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Definition:&#039;&#039;&#039; An &#039;&#039;event&#039;&#039; is some subset of outcomes from the &#039;&#039;sample space&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In the dice example, events of interest might include&amp;lt;br&amp;gt;&lt;br /&gt;
a) the outcome is an even number&amp;lt;br&amp;gt;&lt;br /&gt;
b) the outcome is less than three&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These events can be expressed in terms of the possible outcomes from the experiment: &amp;lt;br&amp;gt;&lt;br /&gt;
a) : &amp;lt;math&amp;gt; \{2,4,6\} &amp;lt;/math&amp;gt; b) &amp;lt;math&amp;gt; \{ 1,2 \}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can borrow definitions from set theory to express events in terms of outcomes.  Here is a refresher of the terminology: &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \cup &amp;lt;/math&amp;gt; represents the Union of two events&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:[http://en.wikipedia.org/wiki/Image:Venn_A_union_B.png]]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \cap &amp;lt;/math&amp;gt; represents the Interection of two events&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:[http://en.wikipedia.org/wiki/Image:Venn_A_intersect_B.png]]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\{\cdots\}^{c}&amp;lt;/math&amp;gt; represents the complement of an event.  For instance, &amp;quot;the outcome is an even number&amp;quot; is the complement of &amp;quot;the outcome is an odd number&amp;quot; in the dice example.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\varnothing&amp;lt;/math&amp;gt; or &amp;lt;math&amp;gt;\{\}&amp;lt;/math&amp;gt; represent an &#039;&#039;impossible event&#039;&#039;&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>69.118.80.7</name></author>
	</entry>
	<entry>
		<id>https://ideawaza.com/index.php?title=Introduction_to_Statistics&amp;diff=17010</id>
		<title>Introduction to Statistics</title>
		<link rel="alternate" type="text/html" href="https://ideawaza.com/index.php?title=Introduction_to_Statistics&amp;diff=17010"/>
		<updated>2005-06-28T16:22:17Z</updated>

		<summary type="html">&lt;p&gt;69.118.80.7: /* Experiments, Outcomes and Events */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Experiments, Outcomes and Events ==&lt;br /&gt;
&lt;br /&gt;
The easiest way to think of probability is in terms of experiments and their potential outcomes.  Many examples can be drawn from everyday experience:  On the drive home from work, you can encounter a flat tire, or have an uneventful drive; the outcome of an election can include either a win by candidate A, B, or C, or a runoff.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Definition:&#039;&#039;&#039; The entire collection of possible outcomes from an experiment is termed the &#039;&#039;sample space&#039;&#039;, indicated as &#039;&#039;&#039;&amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The simplest (albeit uninteresting) example would be an experiment with only one possible outcome, say &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.  If we remember our set theory from elementary school, we can expressed the sample space as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega = \{ A \} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A more interesting example is the result of rolling a six sided dice.  The sample space for this experiment is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Omega = \{ 1,2,3,4,5,6 \}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We may be interested in &#039;&#039;events&#039;&#039; in an experiment.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Definition:&#039;&#039;&#039; An &#039;&#039;event&#039;&#039; is some subset of outcomes from the &#039;&#039;sample space&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In the dice example, events of interest might include&amp;lt;br&amp;gt;&lt;br /&gt;
a) the outcome is an even number&amp;lt;br&amp;gt;&lt;br /&gt;
b) the outcome is less than three&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These events can be expressed in terms of the possible outcomes from the experiment: &amp;lt;br&amp;gt;&lt;br /&gt;
a) : &amp;lt;math&amp;gt; \{2,4,6\} &amp;lt;/math&amp;gt; b) &amp;lt;math&amp;gt; \{ 1,2 \}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can borrow definitions from set theory to express events in terms of outcomes.  Here is a refresher of the terminology: &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \cup &amp;lt;/math&amp;gt; represents the Union of two events&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:[http://en.wikipedia.org/wiki/Image:Venn_A_union_B.png]]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \cap &amp;lt;/math&amp;gt; represents the Interection of two events&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:[http://en.wikipedia.org/wiki/Image:Venn_A_intersect_B.png]]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\{\cdots\}^{c}&amp;lt;/math&amp;gt; represents the complement of an event&amp;lt;br&amp;gt;&lt;br /&gt;
For instance, &amp;quot;the outcome is an even number&amp;quot; is the complement of &amp;quot;the outcome is an odd number&amp;quot; in the dice example.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\varnothing&amp;lt;/math&amp;gt; or &amp;lt;math&amp;gt;\{\}&amp;lt;/math&amp;gt; represent an &#039;&#039;impossible event&#039;&#039;&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>69.118.80.7</name></author>
	</entry>
</feed>