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

  <name>Gamblers Fallacy Simulation</name>

  <metadata>
  <md:version>1.3</md:version>
  <md:created>2003/05/30</md:created>
  <md:revised>2003/07/18 10:49:19.330 GMT-5</md:revised>
  <md:authorlist>
    <md:author id="dmlane">
      <md:firstname>David</md:firstname>
      
      <md:surname>Lane</md:surname>
      <md:email>lane@rice.edu</md:email>
    </md:author>
  </md:authorlist>

  <md:maintainerlist>
    <md:maintainer id="dmlane">
      <md:firstname>David</md:firstname>
      
      <md:surname>Lane</md:surname>
      <md:email>lane@rice.edu</md:email>
    </md:maintainer>
    <md:maintainer id="mjeanes">
      <md:firstname>Matthew</md:firstname>
      
      <md:surname>Jeanes</md:surname>
      <md:email>mjeanes@rice.edu</md:email>
    </md:maintainer>
  </md:maintainerlist>
  
  

  <md:abstract/>
</metadata>

  <content>
    <para id="beginby">
      Begin by answering the questions, even if you have to guess. The
      first time you answer the questions you will not be told whether
      you are correct or not.
    </para>

    <para id="onceyou">
      Once you have answered all the questions, answer them again
      using the simulation to help you. This time you will get
      feedback about each individual answer.
    </para>
    <para id="showsim">
      <cnxn target="genins">Show Simulation</cnxn>
    </para>
    
    <media type="application/x-java-applet" src="questionbase.questionBase.class">
      <param name="ARCHIVE" value="questionbase.jar"/>
      <param name="width" value="480"/>
      <param name="height" value="330"/>
      <param name="XML" value="gambler_fallacy.xml"/>
      <param name="Background" value="16777164"/>
      <param name="FontSize" value="14"/>
      <param name="EndInfo" value="Please use the simulation to help you discover and understand the answers to the questions."/>
    </media>
    
  <section id="genins">
    <name>General Instructions</name>
    <para id="thegambler">
      The gambler's fallacy involves beliefs about sequences of
      independent events. By definition, if two events are
      independent, the occurrence of one event does not affect the
      occurrence of the second. For example, if a fair coin is flipped
      twice, the occurrence of a head on the first flip does not
      affect the outcome of the second flip. What if a coin is flipped
      five times and comes up heads each time. Is a tail "due" and
      therefore more likely than not to occur on the next flip. Since
      the events are independent, the answer is "no." The gambler's
      fallacy is mistakenly believing that the answer is "yes."
    </para>

    <para id="believers">
      Believers in the fallacy argue correctly that in the long run,
      the proportion of heads will be 0.50. Or, stated more precisely,
      that as the number of flips approaches infinity, the proportion
      of heads approaches 0.50. Doesn't this imply that there must be
      some natural adjustment occurring, compensating for a string of
      heads with the later occurrence of more tails? This simulation
      allows you to explore this question yourself.
    </para>

    <para id="youcan">
      You can simulate the flipping of a single coin by clicking the
      "flip once" button. The number of flips (n), the number of
      heads, the number of tails, the difference between the number of
      heads and the number of tails, and the proportion of heads are
      all recorded and displayed.
    </para>

    <para id="tospeed">
      To speed things up, you can click the "Flip 100 times" or the
      "Flip 1000 times" buttons. The "reset" button clears all the
      data.
    </para>

    <para id="thelower">
      The lower portion of the simulation allows you to simulate
      25,000 flips at a time. After you click the "Flip 25,000 times
      and draw graphs" button, the graph on the left will plot the
      difference between the number of heads and tails as a function
      of the number of coin flips. The graph on the right will plot
      the proportion of heads as a function of the number of coin
      flips.
    </para>
    </section>

    <section id="stepbystep">
      <name>Step by Step Instructions</name>
      <para id="link">
	<cnxn target="beginby">Show Questions</cnxn>
      </para>
      
      <para id="clickthe">
	Click the "flip once" button and you will see a simulated coin
	toss. You will see the results which will show the number of
	flips (n) which, of course will be 1 after just one flip. Also
	shown will be the number of heads, the number of tails, the
	difference between these two quantities, and the proportion of
	flips that came up heads.
      </para>

      <para id="clickfew">
	Click the "flip once" button a few times and view the
	results. Now try clicking the "flip 100" button. You will see
	the results of 100 coin flips. Take a look at the difference
	between the number of heads and the number of tails. Is it
	close to 0? Is the proportion of heads close to 0.5, Click the
	"flip 1000" button several times noting the result after each
	time. Is the difference between the number of heads and tails
	converging on 0? Is the proportion of heads converging on 0.5?
      </para>

      <para id="foramore">
	For a more precise answer to these questions, click the "Flip
	25,000 times and draw graphs" button. The graph on the left
	shows the difference between the number of heads and tails on
	the Y-axis. The number of flips is shown on the X-axis. Does
	the graph look like it is heading for 0?
      </para>

      <para id="thegraph">
	The graph on the right shows the proportion of heads as a
	function of the number of flips. Does it look like it is
	converging on 0.5?
      </para>

      <para id="clicktheflip">
	Click the "Flip 25,000 times and draw graphs" button over and
	over with these questions in mind. It may take as many as
	1,000,000 flips for the proportion of heads to be 0.500
	(rounded of to three decimal places) although it will probably
	reach that value much sooner. Does the difference between the
	number of heads and tails converge on 0 the way the proportion
	of heads converges on 0.5?
      </para>

      <para id="thissimulation">
	This simulation shows that the difference between the number
	of heads and the number of tails does not converge on 0. There
	is no "compensatory force" that makes up for too many heads
	(or tails) by causing more of tails to occur. The reason that
	the proportion of heads approaches 0 is that the difference
	between the number of heads and tails becomes very small
	compared to the total number of coin flips.
      </para>

      <media type="application/x-java-applet" src="flipacoin.flipacoin.class">
	<param name="archive" value="flipacoin.jar"/>
	<param name="width" value="400"/>
	<param name="height" value="525"/>
	<param name="name" value="flipacoin"/>
      </media>

    </section>
    <section id="summary">
      <name>Summary</name>
      <para id="summ">
	When an interval scale such as sugar content is mapped onto a
	rating scale such as judgment of sweetness, the resulting
	rating scale is probably not an interval scale. For most
	real-world situations, the means of ordinal-level rating
	scales allow valid conclusions about the direction of the
	means on the interval scale. However, it is theoretically
	possible for means on the ordinal scale to be in the opposite
	direction from means on the interval scale. Experts disagree
	on the importance of this in real-world data analysis. We
	believe that the chances of misintrepretation with real data
	are extremely low, and that it is only with contrived
	artificial data and mappings of the interval to the ordinal
	scale that these problems occur.
      </para>
    </section> 
  </content>
  
</document>
