<?xml version="1.0"?>
<!DOCTYPE activity SYSTEM "escot.dtd" >
<activity name="Week 3" size="560, 550" escotVersion="1.2.15" puzzle_id="25">
  <page name="Introduction">
    <component class="org.escot.demo.HTMLViewer" position="5,5" size="540,383" visible="true" portid="HTMLViewer-1">
      <![CDATA[<html>
<body>
<h3>Week 3: Reversing the process</h3>
<P><B>Make a mathematical prediction</B>: Last week's investigation showed that if you have two concentric circles where the radius of the outer circle is twice the radius of the inner circle, then only 25% of points randomly generated in the circles will fall inside the inner circle.  In this investigation, you will try to make 50% of the points fall in the inner circle. You will experiment with the length of the radius of the inner circle so that half of the points fall inside the inner circle, and the other half fall in the outer circle.  Which of the following choices do you think best estimates how big the radius of the inner circle would have to be in order to make 50% of the points fall in the inner circle?</p>

1. Inner circle radius would be 0.25 times the size of the outer circle radius.<BR>
2. Inner circle radius would be 0.5 times the size of the outer circle radius.<BR>
3. Inner circle radius would be 0.7 times the size of the outer circle radius.<BR>
4. Inner circle radius would be 0.9 times the size of the outer circle radius.<BR><BR>

<B>Please record your prediction below.</B>
</body></html>]]>
    </component>
    <component class="org.escot.demo.TextEditor" position="6,398" size="540,95" visible="true" answerText="true" portid="TextEditor-1">
      <![CDATA[Prediction:

The inner circle radius needs to be [...insert a decimal fraction here...] of the size of the outer circle radius for 50% of the points to fall in the inner circle, because [...insert your explanation here...]]]>
      <property name="background" value="255,255,255"/>
      <property name="foreground" value="0,0,0"/>
      <property name="font" value="dialog,Dialog,0,12"/>
    </component>
  </page>
  <page name="Activity Page">
    <component class="edu.colorado.agentsheets.AgentSheetsWrapper" position="304,5" size="282,265" visible="true" portid="AgentSheetsWrapper-1">
      <property name="classname" value="pimachine_week3"/>
      <property name="XMLPropertysheet" value="pim3.sip"/>
      <property name="XMLWorksheet" value="week3.ws"/>
    </component>
    <component class="virtuoso.logo.LogoScript" position="460,550" size="28,17" visible="true" portid="LogoScript-1">
      <export name="InnerRadius" type="number">10.0</export>
      <export name="OuterRadius" type="number">20.0</export>
      <export name="RadiiRatio" type="number">0.5</export>
      <export name="Total Points" type="number">100.0</export>
      <export name="InInner" type="number">2093.0</export>
      <export name="%(Inner)" type="number">25.15322494506836</export>
      <![CDATA[]]>
      <property name="toolBarShowing" value="false"/>
    </component>
    <component class="org.escot.demo.SimpleNumberTable" position="5,300" size="472,95" visible="true" portid="SimpleNumberTable-1">
      <customProperty name="models" value="InnerRadius,OuterRadius,RadiiRatio,Total Points,InInner,%(Inner)"/>
      <property name="orientation" value="1"/>
      <property name="maximumFractionDigits" value="2"/>
      <property name="minimumFractionDigits" value="0"/>
      <property name="font" value="dialog,Dialog,0,12"/>
      <property name="live" value="false"/>
    </component>
    <component class="com.sri.escot.NumberEntry" position="303,274" size="159,21" visible="true" portid="NumberEntry-1">
      <property name="value" value="0.0"/>
      <property name="minimumDecimalPlaces" value="0"/>
      <property name="allowNegative" value="true"/>
      <property name="editable" value="true"/>
      <property name="maximumDecimalPlaces" value="3"/>
      <property name="label" value="Number of Points:"/>
      <property name="suffix" value=""/>
    </component>
    <component class="org.escot.demo.ButtonPanel" position="488,329" size="85,34" visible="true" portid="ButtonPanel-1">
      <property name="font" value="dialog,Dialog,0,12"/>
    </component>
    <component class="org.escot.demo.HTMLViewer" position="5,5" size="298,247" visible="true" portid="HTMLViewer-1">
      <![CDATA[<html><body><b>Collect data to investigate your prediction</b>

<p>One way to check your predictions is to run an experiment. You can use the computer simulation provided in this activity page to do that.</P>
<p>In this simulation, the outer radius is fixed to 20 units and you can change the inner radius with the slider.</P>

<p><b>To run your experiments, please follow these steps carefully and in order:</b></p>

1. If you do not see two circles in the "Worksheet" area on the right, hit the "Reset" button and wait until they show up.  It may take some time to reload the picture in the simulation window, so please be patient!<BR>
2. If you want to change the inner radius, move the slider bar below to the number you wish.  The inner radius can take integer values from 5 to 20. For example, you can set the inner radius to be 5, 6, 7, 8 and so on. <I>Hint</I>: To check the prediction you made in the previous page, you need to calculate how big the inner radius needs to get to be, for example, 1/4 of the outer radius. Remember that the outer radius is 20 units.<BR>
3. Click on the box called "Number of Points" and enter the number of points you want the simulation to generate.  We suggest that you use 100, 1000, 10000, and 100000 points.  Please note, that the greater the number of points, the more accurate your results.  However, you should be aware that experiments with smaller radii and large number of points will take a long time to run.<BR>
4. Click the "Run" button (located under the simulation). <BR>
5. When the simulation is done (the "Points left" will count down to 0), click the "Sample" button (located next to the table). Notice how the chart shows the results of your experiment.<BR>
6. Before running the simulation again (for a different radii or number of points), you need to hit the "Reset" button. Wait for the picture in the "Worksheet" area to completely reload and repeat these steps.</p>


<B><p>When you are done experimenting, please answer the activity questions in the answer box below.</p><B>


<p><B>Note</b>: You should close the ESCOT Browser when you finish this activity.  If you want to run other activities, run the Browser again.</p>
</body></html>

]]>
    </component>
    <component class="org.escot.demo.TextEditor" position="5,400" size="550,120" visible="true" answerText="true" portid="TextEditor-1">
      <![CDATA[Complete the following sentences:

Approximately  50% of the points fall in the inner circle when the outer
circle has a radius of 20, the inner radius is [...insert a number here...].  This happens because [...insert a mathematical explanation here...].]]>
      <property name="background" value="255,255,255"/>
      <property name="foreground" value="0,0,0"/>
      <property name="font" value="dialog,Dialog,0,12"/>
    </component>
    <component class="com.sri.escot.EscotSwingSlider" position="5,255" size="290,44" visible="true" portid="EscotSwingSlider-1">
      <property name="scaleFactor" value="1.0"/>
      <property name="value" value="11"/>
      <property name="orientation" value="0"/>
      <property name="snapToTicks" value="true"/>
      <property name="maximumValue" value="20"/>
      <property name="majorTickSpacing" value="1"/>
      <property name="paintTicks" value="true"/>
      <property name="minorTickSpacing" value="0"/>
      <property name="minimumValue" value="5"/>
      <property name="paintLabels" value="true"/>
    </component>
    <component class="com.sri.escot.NumberEntry" position="466,273" size="115,21" visible="true" portid="NumberEntry-2">
      <property name="value" value="3079.0"/>
      <property name="minimumDecimalPlaces" value="0"/>
      <property name="allowNegative" value="false"/>
      <property name="editable" value="false"/>
      <property name="maximumDecimalPlaces" value="3"/>
      <property name="label" value="Points Left:"/>
      <property name="suffix" value=""/>
    </component>
    <wire type="org.escot.Broker">
      <from portid="AgentSheetsWrapper-1" name="NUMBEROFPOINTS"/>
      <to portid="NumberEntry-2" name="number"/>
    </wire>
    <wire type="org.escot.Broker">
      <from portid="NumberEntry-1" name="number"/>
      <to portid="AgentSheetsWrapper-1" name="NUMBEROFPOINTS"/>
      <to portid="AgentSheetsWrapper-1" name="TOTALPOINTS"/>
    </wire>
    <wire type="org.escot.Broker">
      <from portid="AgentSheetsWrapper-1" name="PROBABILITYININNERCIRCLE"/>
      <to portid="LogoScript-1" name="%(Inner)"/>
    </wire>
    <wire type="org.escot.Broker">
      <from portid="AgentSheetsWrapper-1" name="POINTSININNERCIRCLE"/>
      <to portid="LogoScript-1" name="InInner"/>
    </wire>
    <wire type="org.escot.Broker">
      <from portid="LogoScript-1" name="InnerRadius"/>
      <to portid="SimpleNumberTable-1" name=""/>
    </wire>
    <wire type="org.escot.Broker">
      <from portid="LogoScript-1" name="OuterRadius"/>
      <to portid="SimpleNumberTable-1" name=""/>
    </wire>
    <wire type="org.escot.Broker">
      <from portid="LogoScript-1" name="RadiiRatio"/>
      <to portid="SimpleNumberTable-1" name=""/>
    </wire>
    <wire type="org.escot.Broker">
      <from portid="LogoScript-1" name="Total Points"/>
      <to portid="SimpleNumberTable-1" name=""/>
    </wire>
    <wire type="org.escot.Broker">
      <from portid="LogoScript-1" name="InInner"/>
      <to portid="SimpleNumberTable-1" name=""/>
    </wire>
    <wire type="org.escot.Broker">
      <from portid="LogoScript-1" name="%(Inner)"/>
      <to portid="SimpleNumberTable-1" name=""/>
    </wire>
    <wire type="org.escot.Broker">
      <from portid="SimpleNumberTable-1" name="Sample"/>
      <to portid="ButtonPanel-1" name=""/>
    </wire>
    <wire type="org.escot.Broker">
      <from portid="AgentSheetsWrapper-1" name="TOTALPOINTS"/>
      <to portid="LogoScript-1" name="Total Points"/>
    </wire>
    <wire type="org.escot.Broker">
      <from portid="AgentSheetsWrapper-1" name="RATIO"/>
      <to portid="LogoScript-1" name="RadiiRatio"/>
    </wire>
    <wire type="org.escot.Broker">
      <from portid="AgentSheetsWrapper-1" name="OUTERRADIUS"/>
      <to portid="LogoScript-1" name="OuterRadius"/>
    </wire>
    <wire type="org.escot.Broker">
      <from portid="AgentSheetsWrapper-1" name="INNERRADIUS"/>
      <to portid="LogoScript-1" name="InnerRadius"/>
    </wire>
    <wire type="org.escot.Broker">
      <from portid="EscotSwingSlider-1" name="value"/>
      <to portid="AgentSheetsWrapper-1" name="INNERRADIUS"/>
    </wire>
  </page>
</activity>

