|
1 | 1 | <?xml version="1.0" encoding="utf-8"?> |
2 | | -<model version="NetLogo 7.0.0-beta0" snapToGrid="false"> |
| 2 | +<model version="NetLogo 7.0.0-beta2" snapToGrid="true"> |
3 | 3 | <code><![CDATA[globals [ |
4 | 4 | event |
5 | 5 | total-attempts |
@@ -100,56 +100,56 @@ end |
100 | 100 | ; Copyright 2004 Uri Wilensky. |
101 | 101 | ; See Info tab for full copyright and license.]]></code> |
102 | 102 | <widgets> |
103 | | - <view x="243" wrappingAllowedX="true" y="10" frameRate="30.0" minPycor="0" height="11" showTickCounter="true" patchSize="7.0" fontSize="10" wrappingAllowedY="true" width="249" tickCounterLabel="ticks" maxPycor="0" updateMode="1" maxPxcor="17" minPxcor="-17"></view> |
104 | | - <button x="102" y="35" height="46" disableUntilTicks="true" forever="true" kind="Observer" display="Go" width="79" sizeVersion="0">go</button> |
105 | | - <button x="7" y="35" height="46" disableUntilTicks="false" forever="false" kind="Observer" display="Setup" width="79" sizeVersion="0">setup</button> |
106 | | - <plot x="204" autoPlotX="true" yMax="1.0" autoPlotY="true" yAxis="Successes per Attempts" y="35" xMin="0.0" height="183" legend="false" xMax="100.0" yMin="0.0" xAxis="Attempts" display="m/n convergence to limiting value" width="342" sizeVersion="0"> |
| 103 | + <view x="285" wrappingAllowedX="true" y="7" frameRate="30.0" minPycor="0" height="11" showTickCounter="true" patchSize="7.0" fontSize="10" wrappingAllowedY="true" width="249" tickCounterLabel="ticks" maxPycor="0" updateMode="1" maxPxcor="17" minPxcor="-17"></view> |
| 104 | + <note x="10" y="80" backgroundDark="0" fontSize="11" width="139" markdown="false" height="104" textColorDark="-1" textColorLight="-16777216" backgroundLight="0">The program will |
| 105 | +record and plot the |
| 106 | +random occurrence |
| 107 | +of the event "1" |
| 108 | +among other integers |
| 109 | +in the sample space |
| 110 | +of size...</note> |
| 111 | + <monitor x="140" precision="3" y="100" height="60" fontSize="11" width="100">event</monitor> |
| 112 | + <button x="5" y="7" height="46" disableUntilTicks="false" forever="false" kind="Observer" width="100" display="Setup">setup</button> |
| 113 | + <slider x="5" step="1" y="190" max="10" width="235" display="sample-space-size" height="55" min="1" direction="Horizontal" default="2.0" variable="sample-space-size"></slider> |
| 114 | + <monitor x="479" precision="3" y="661" height="60" fontSize="11" width="105" display="max">max successes-per-sample-list</monitor> |
| 115 | + <monitor x="364" precision="3" y="661" height="60" fontSize="11" width="110" display="mean">mean successes-per-sample-list</monitor> |
| 116 | + <plot x="244" autoPlotX="true" yMax="25.0" autoPlotY="true" yAxis="Frequency" y="456" xMin="0.0" height="200" legend="false" xMax="10.0" yMin="0.0" width="342" xAxis="Successes" display="Successes-per-Sample Distribution"> |
107 | 117 | <setup></setup> |
108 | 118 | <update></update> |
109 | | - <pen interval="1.0" mode="0" display="default" color="-16777216" legend="true"> |
| 119 | + <pen interval="1.0" mode="1" display="default" color="-16777216" legend="true"> |
110 | 120 | <setup></setup> |
111 | 121 | <update></update> |
112 | 122 | </pen> |
113 | 123 | </plot> |
114 | | - <plot x="204" autoPlotX="true" yMax="10.0" autoPlotY="true" yAxis="Frequency" y="219" xMin="1.0" height="160" legend="false" xMax="50.0" yMin="0.0" xAxis="Run Length" display="Attempts-until-Success Distribution" width="342" sizeVersion="0"> |
| 124 | + <monitor x="589" precision="3" y="326" height="60" fontSize="11" width="149" display="mean">mean counter-list</monitor> |
| 125 | + <monitor x="589" precision="3" y="266" height="60" fontSize="11" width="149">counter</monitor> |
| 126 | + <monitor x="589" precision="3" y="456" height="60" fontSize="11" width="147">successes-this-sample</monitor> |
| 127 | + <plot x="244" autoPlotX="true" yMax="10.0" autoPlotY="true" yAxis="Frequency" y="266" xMin="1.0" height="185" legend="false" xMax="50.0" yMin="0.0" width="342" xAxis="Run Length" display="Attempts-until-Success Distribution"> |
115 | 128 | <setup></setup> |
116 | 129 | <update></update> |
117 | 130 | <pen interval="1.0" mode="1" display="default" color="-16777216" legend="true"> |
118 | 131 | <setup></setup> |
119 | 132 | <update></update> |
120 | 133 | </pen> |
121 | 134 | </plot> |
122 | | - <slider x="9" step="1" y="203" max="10" display="sample-space-size" height="33" min="1" direction="Horizontal" default="2.0" variable="sample-space-size" width="175" sizeVersion="0"></slider> |
123 | | - <plot x="204" autoPlotX="true" yMax="25.0" autoPlotY="true" yAxis="Frequency" y="378" xMin="0.0" height="161" legend="false" xMax="10.0" yMin="0.0" xAxis="Successes" display="Successes-per-Sample Distribution" width="342" sizeVersion="0"> |
| 135 | + <plot x="244" autoPlotX="true" yMax="1.0" autoPlotY="true" yAxis="Successes per Att" y="21" xMin="0.0" height="240" legend="false" xMax="100.0" yMin="0.0" width="342" xAxis="Attempts" display="m/n convergence to limiting value"> |
124 | 136 | <setup></setup> |
125 | 137 | <update></update> |
126 | | - <pen interval="1.0" mode="1" display="default" color="-16777216" legend="true"> |
| 138 | + <pen interval="1.0" mode="0" display="default" color="-16777216" legend="true"> |
127 | 139 | <setup></setup> |
128 | 140 | <update></update> |
129 | 141 | </pen> |
130 | 142 | </plot> |
131 | | - <slider x="12" step="5" y="461" max="100" display="sample-size" height="33" min="0" direction="Horizontal" default="10.0" variable="sample-size" width="172" sizeVersion="0"></slider> |
132 | | - <slider x="10" step="10" y="375" max="1000" display="how-many-samples?" height="33" min="0" direction="Horizontal" default="1000.0" variable="how-many-samples?" width="174" sizeVersion="0"></slider> |
133 | | - <monitor x="550" precision="3" y="112" height="45" fontSize="11" width="99" sizeVersion="0">total-attempts</monitor> |
134 | | - <monitor x="705" precision="3" y="70" height="45" fontSize="11" display="rate" width="57" sizeVersion="0">total-successes / total-attempts</monitor> |
135 | | - <monitor x="550" precision="0" y="35" height="45" fontSize="11" display="total-successes" width="99" sizeVersion="0">total-successes</monitor> |
136 | | - <note x="551" y="89" height="18" textColorLight="-16777216" fontSize="11" width="143" markdown="false">________________ =</note> |
137 | | - <monitor x="549" precision="3" y="379" height="45" fontSize="11" width="147" sizeVersion="0">successes-this-sample</monitor> |
138 | | - <monitor x="12" precision="3" y="495" height="45" fontSize="11" width="172" sizeVersion="0">attempts-this-sample</monitor> |
139 | | - <monitor x="549" precision="3" y="219" height="45" fontSize="11" width="57" sizeVersion="0">counter</monitor> |
140 | | - <monitor x="11" precision="3" y="409" height="45" fontSize="11" width="173" sizeVersion="0">samples-counter</monitor> |
141 | | - <monitor x="445" precision="3" y="540" height="45" fontSize="11" display="max" width="101" sizeVersion="0">max successes-per-sample-list</monitor> |
142 | | - <monitor x="204" precision="3" y="540" height="45" fontSize="11" display="min" width="104" sizeVersion="0">min successes-per-sample-list</monitor> |
143 | | - <monitor x="325" precision="3" y="540" height="45" fontSize="11" display="mean" width="104" sizeVersion="0">mean successes-per-sample-list</monitor> |
144 | | - <note x="9" y="87" height="104" textColorLight="-16777216" fontSize="11" width="139" markdown="false">The program will |
145 | | -record and plot the |
146 | | -random occurrence |
147 | | -of the event "1" |
148 | | -among other integers |
149 | | -in the sample space |
150 | | -of size...</note> |
151 | | - <monitor x="549" precision="3" y="270" height="45" fontSize="11" display="mean" width="57" sizeVersion="0">mean counter-list</monitor> |
152 | | - <monitor x="142" precision="3" y="93" height="45" fontSize="11" width="50" sizeVersion="0">event</monitor> |
| 143 | + <monitor x="245" precision="3" y="660" height="60" fontSize="11" width="115" display="min">min successes-per-sample-list</monitor> |
| 144 | + <monitor x="5" precision="3" y="635" height="60" fontSize="11" width="235">attempts-this-sample</monitor> |
| 145 | + <slider x="5" step="5" y="575" max="100" width="235" display="sample-size" height="55" min="0" direction="Horizontal" default="10.0" variable="sample-size"></slider> |
| 146 | + <slider x="5" step="10" y="455" max="1000" width="235" display="how-many-samples?" height="55" min="0" direction="Horizontal" default="1000.0" variable="how-many-samples?"></slider> |
| 147 | + <monitor x="5" precision="3" y="515" height="60" fontSize="11" width="235">samples-counter</monitor> |
| 148 | + <monitor x="590" precision="0" y="20" height="60" fontSize="11" width="149" display="total-successes">total-successes</monitor> |
| 149 | + <note x="591" y="84" backgroundDark="0" fontSize="11" width="143" markdown="false" height="18" textColorDark="-1" textColorLight="-16777216" backgroundLight="0">________________ =</note> |
| 150 | + <monitor x="590" precision="3" y="107" height="60" fontSize="11" width="149">total-attempts</monitor> |
| 151 | + <monitor x="745" precision="3" y="60" height="60" fontSize="11" width="100" display="rate">total-successes / total-attempts</monitor> |
| 152 | + <button x="109" y="7" height="46" disableUntilTicks="true" forever="true" kind="Observer" width="130" display="Go">go</button> |
153 | 153 | </widgets> |
154 | 154 | <info><![CDATA[## WHAT IS IT? |
155 | 155 |
|
|
0 commit comments