Predict Outcomes Using Theoretical Probability

Predict Outcomes Using Theoretical Probability
Loading the math board and drawing, please wait…
2023-04-20 08:44
This example uses theoretical probability to predict outcomes of different situations. It involves core probability concepts and uses GeoGebra commands such as RandomUniform, Sequence, Element, etc. Suitable for middle school students to learn probability prediction.

GeoGebra Commands & Parameters

  1. RandomUniform(0, 0.99, 200) → allRandoms, {0.5234889222319805, 0.19046229876951404, 0.7476313667758954, 0.7261991573684423, 0.42893270118384313, 0.33558232644454694, 0.6523983715540687, 0.7111924963047018, 0.3149670313827804, 0.7394451580827477, 0.2862764674556325, 0.4204336667098398, 0.2768070622739302, 0.4003320806976258, 0.4917578343667702, 0.5375471914448393, 0.21545980872082524, 0.42266466886015785, 0.28117958681067573, 0.26981963621862937, 0.40628640681739364, 0.5132714883486572, 0.47051753193487034, 0.13735327400178088, 0.12664106052794216, 0.6176199824861032, 0.7504394685234986, 0.43780251734078063, 0.2614686179496461, 0.9152929886198066, 0.9344315288213926, 0.0513972807689283, 0.9837791111699865, 0.7928859512010616, 0.5229429087063306, 0.05469794857663217, 0.14464275063928161, 0.7585847039030318, 0.016312244998051006, 0.9774540208293717, 0.32476046760847965, 0.655955276259522, 0.027744740218052413, 0.9650541203993103, 0.8167651675391981, 0.5949361863639188, 0.8808030229302324, 0.14935744970011305, 0.9541957412358669, 0.2256699774670748, 0.28375460059802465, 0.12318718270808456, 0.9195605524206195, 0.8956450952149201, 0.5456882849741498, 0.11844407563028518, 0.9800689904843115, 0.29264034459051724, 0.33656683976672175, 0.6346634389423922, 0.7154597631000277, 0.6751732472866704, 0.7653270637462255, 0.1638922014586306, 0.07789128254223851, 0.0385502429260083, 0.5867692044757465, 0.40900161735366786, 0.09908439465181654, 0.5382005167183949, 0.5292958393342891, 0.20598060416653607, 0.6548195122352743, 0.7127467343650673, 0.8915663679901799, 0.7963685283722998, 0.8614900516970507, 0.8572250190200118, 0.2668266799168173, 0.8137897268735677, 0.6537013132861668, 0.7520128936195278, 0.38905415589201175, 0.6085419960289031, 0.6658781784329156, 0.8853579889422685, 0.5751267303009213, 0.9663693173351674, 0.7245071516428578, 0.6469218325777659, 0.30198064712872985, 0.571913848665924, 0.10098848207361857, 0.8964617505271415, 0.3171646392611975, 0.4238954918004874, 0.22811028119172355, 0.4656707903250845, 0.33532961026384633, 0.937806997044187, 0.8658819385127462, 0.7822793141681113, 0.1720103316178119, 0.942840959135998, 0.34487583594701865, 0.9137933386809535, 0.31956287448970366, 0.9628796284908644, 0.11732596593727618, 0.6637039769243142, 0.14831356103836035, 0.8166817307483646, 0.1380196578967235, 0.24564845014486203, 0.18885686670102048, 0.30989033128731314, 0.11849232316100784, 0.41083740928566276, 0.6090077158865518, 0.24116377829746297, 0.379198171476202, 0.38108467725750056, 0.5411697740440984, 0.6865970673021369, 0.10517891272349607, 0.16398450874396495, 0.7628242624697309, 0.600653001613398, 0.49128971944799665, 0.18817793210641612, 0.33447513119791006, 0.3480640357262351, 0.8932662889327209, 0.2352337467775964, 0.7057043201365121, 0.819592049945222, 0.9408289735782394, 0.670441328889022, 0.40099751731413263, 0.07514942705202113, 0.5286197779828097, 0.007771164211489656, 0.4726927304483177, 0.11058744009203772, 0.8900546209818333, 0.5144056003903323, 0.9187867740865605, 0.8794476159565592, 0.11814837175271026, 0.6475766014145735, 0.6984011222521667, 0.8581503153901657, 0.9660319911594072, 0.3009681898606406, 0.03746621597078779, 0.6624593011799637, 0.6182309999980637, 0.8496506207154894, 0.8216254012631784, 0.674614222722385, 0.4618109647436205, 0.27140999384321823, 0.11249105962272576, 0.2742630009133894, 0.31422137942255085, 0.8284203755753542, 0.9172040700951681, 0.5322537309677888, 0.31208033478080827, 0.5464777025396865, 0.529752905004513, 0.9544613896597312, 0.0022423762643256863, 0.30947314206101606, 0.6157028737324693, 0.6831267148526577, 0.6632797655576967, 0.0744304551005193, 0.8998661928073128, 0.13567564167089402, 0.36198051292605044, 0.28726570077289587, 0.6990121247488378, 0.8756643562792061, 0.9156299813457189, 0.7314491326081423, 0.038972728802176795, 0.7573617021131641, 0.01669196096826104, 0.740958159377592, 0.33744222539479707, 0.8345318124858794, 0.46204202765359487, 0.47530677748177147, 0.1603998825972518, 0.9752214224062253, 0.05413079113999657, 0.6080205883012102, 0.011403703978903635, 0.18778327119269103}
  2. Sequence(1 + floor((Element[allRandoms, Mod[countQuestion + A, Length[allRandoms]] + 1] * 4)), A, 1, numSectors) → sectorsTypes, {1, 3, 3, 2, 2, 3}
  3. Sequence(Element[allRandoms, Mod[(countQuestion * numRands) + A, Length[allRandoms]] + 1], A, 0, numRands - 1) → currentRandoms
  4. Element({20 + floor((currentRandoms(1) * 180)), sectorsTypes(floor((currentRandoms(1) * numSectors)) + 1), 1 + floor((currentRandoms(1) * 5))}, caseNum) → var1
  5. Sequence(1 + floor((Element[allRandoms, Mod[(countQuestion * 7) + A, Length[allRandoms]] + 1] * 5)), A, 1, 20) → diceRolls, {1, 4, 4, 3, 2, 4, 4, 2, 4, 2, 3, 2, 3, 3, 3, 2, 3, 2, 2, 3}
  6. Element({1 + floor((currentRandoms(2) * 2)), 20 + floor((currentRandoms(2) * 180)), 100 + floor((currentRandoms(2) * 100))}, caseNum) → var2
  7. CountIf(A ≟ var1, A, diceRolls) → numCountedCase3
  8. CountIf(x ≟ var1, Take[sectorsTypes, 1, numSectors]) → numSymbols
  9. Element({var1 / 2, (numSymbols / numSectors * var2), (numCountedCase3 / 20 * var2)}, caseNum) → ansVal
  10. If(ansVal ≟ round(ansVal), "=", "\approx") → eqApprox
  11. Point(x = x(CenterSpinner)) → StopSpinner
  12. Polygon(Zip[PixelsToPoint[Corner[1], Corner[3], Corner[5], A], A, {(xPixelsLeft, yPixelsBottom), (xPixelsLeft, y(Corner[5]) - yPixelsTop), Corner[5] - (xPixelsRight, yPixelsTop), (x(Corner[5]) - xPixelsRight, yPixelsBottom)}]) → borderBox
  13. Corner(5) → AppSize
  14. Rotate((0.1 * CenterSpinner) + (0.9 * StopSpinner), sectorSize / 2 - 12°, CenterSpinner) → BaseImgC1
  15. Rotate((0.1 * CenterSpinner) + (0.9 * StopSpinner), sectorSize / 2 + 12°, CenterSpinner) → BaseImgC2
  16. If(GCD[numSectors, CountIf[x ≟ var1, sectorsTypes]] > 1, " or \textbf{\[" + (FractionText[CountIf[x ≟ var1, sectorsTypes] / numSectors]) + "\]}", "") → fraction2reduced
  17. PointToPixels1(Corner[1], Corner[3], Corner[5], CenterSpinner) → CenterPixels
  18. Element({180, 250, 250}, caseNum) → layoutY
  19. Textfield(studentInput) → inputA
  20. Element({If[layoutX ≟ 16, layoutX - 5, 11], layoutX - 5}, layoutCase) → layoutHintSolnX
  21. TableText(Append["\cellcolor{#C0C0C0}Trial #", Sequence[("" * A), A, 1, 20]], Append["\cellcolor{#C0C0C0}Value", Zip[("" * A), A, diceRolls]], "|_c") → case3Table
  22. Zip(If[k ≟ 1, Rotate[pic1, (n * sectorSize) + rotateAngle, CenterSpinner], NaN], k, sectorsTypes, n, Sequence[numSectors]) → sectorsPic1
  23. Zip(If[k ≟ 2, Rotate[pic2, (n * sectorSize) + rotateAngle, CenterSpinner], NaN], k, sectorsTypes, n, Sequence[numSectors]) → sectorsPic2
  24. Zip(If[k ≟ 3, Rotate[pic3, (n * sectorSize) + rotateAngle, CenterSpinner], NaN], k, sectorsTypes, n, Sequence[numSectors]) → sectorsPic3
  25. Zip(If[k ≟ 4, Rotate[pic4, (n * sectorSize) + rotateAngle, CenterSpinner], NaN], k, sectorsTypes, n, Sequence[numSectors]) → sectorsPic4
  26. Zip(If[k ≟ 3, CircleSector[CenterSpinner, Rotate[StopSpinner, (n * sectorSize) + rotateAngle, CenterSpinner], Rotate[StopSpinner, ((n + 1) * sectorSize) + rotateAngle, CenterSpinner]], NaN], k, sectorsTypes, n, Sequence[numSectors]) → sectors3
  27. Zip(If[k ≟ 4, CircleSector[CenterSpinner, Rotate[StopSpinner, (n * sectorSize) + rotateAngle, CenterSpinner], Rotate[StopSpinner, ((n + 1) * sectorSize) + rotateAngle, CenterSpinner]], NaN], k, sectorsTypes, n, Sequence[numSectors]) → sectors4
  28. Zip(If[k ≟ 1, CircleSector[CenterSpinner, Rotate[StopSpinner, (n * sectorSize) + rotateAngle, CenterSpinner], Rotate[StopSpinner, ((n + 1) * sectorSize) + rotateAngle, CenterSpinner]], NaN], k, sectorsTypes, n, Sequence[numSectors]) → sectors1
  29. Zip(If[k ≟ 2, CircleSector[CenterSpinner, Rotate[StopSpinner, (n * sectorSize) + rotateAngle, CenterSpinner], Rotate[StopSpinner, ((n + 1) * sectorSize) + rotateAngle, CenterSpinner]], NaN], k, sectorsTypes, n, Sequence[numSectors]) → sectors2
  30. Zip(CircleSector[CenterSpinner, Rotate[StopSpinner, (n * sectorSize) + rotateAngle, CenterSpinner], Rotate[StopSpinner, ((n + 1) * sectorSize) + rotateAngle, CenterSpinner]], n, Sequence[numSectors]) → sectorsBorders

AI Drawing Prompt Reference

Create a circular disk divided into equal wedge sectors around a single center, and give each sector a distinct colored appearance according to its sector type. For a sequence of 20 trials, for each trial pick a sector type and a dice-roll value, then determine the trial’s displayed numerical result from the matched sector encoding and the dice value; show the corresponding sector geometry at the appropriate rotated position on the disk. Add a table/text panel labeled with “Trial #” and “Value”, containing 20 rows so the value for each trial is presented alongside its trial number.
The prompt above was compiled from the original drawing commands and is for reference only.