Extension to Chance Experiments (v2)

Hello,

I would like to extend the activity by adding a set of slides that would repeat somewhat the idea presented earlier with the 36 spinners going at same time.

So, on slide 13, I would like to create 36 experiments. I don’t need to see the 72 spinners, this seems chaotic. So basically, I would like to create 36 number generators from 1 to 8. If the number is 1 to 3, it enters the result as MATCH in the table and if the number is 4 to 8, then it enters it as DO NOT MATCH in the table.

This is my activity so far.

Thank you!

This exact question has been asked before. I’d search the forums a bit more. I don’t know that it was ever resolved.

I’ve worked on a couple examples of simulations in the last month. Does one of these screens look like something you are looking to do?

Hello cwinske,

I think the idea is in the same ballpark, but I don’t know enough CL to be able to wrap my head around it. Basically, I want to run a simulator that will yield one of two choices with different probability for each. So, it could be like desmos running a number generator, if the number is 1,2 ,3 then it adds +1 in the appropriate column, if the number is different, it adds +1 in the other column. Repeat to 36 times. Does that make sense?

Gama

If you want randomization of only 2 choices, you could just make a list with your weighted probabilities and use that for your randomization. For example, between 0 and 1 with a 70% chance of a 1:

L=[0,0,0,1,1,1,1,1,1,1,1]
C=L.random(36)

Oh, that is simple. And then how do I have the 36 results added to to the table ?

For a table in the graph, you can just title the second or later column “C” (or whatever you choose for your list name), and it will populate with the list.

If you want it in a table component, you’d need to define for each cell individually:

cellContent(1,1): graphName.number(`C[1]`)
cellContent(2,1): graphName.number(`C[2]`)
...

Daniel is on point with getting you started, but I wasn’t sure if you wanted any animations or visual displays in the graph component because that’s where the heavy lifting gets done anyway. I know you said that you didn’t need spinners, but colored points would be easy enough to make to represent a spinner’s result. I can put something together later today if you are interested in that sort of thing.

Here is a working sample of what I think you envisioned. There are 36 experiments of two spinners each. A running total of match/no match is shown in the table.

Wow!!!

I think that hits the spot! Thank you very much!

Hello again. Thank you for helping, it is very complex and I would never had gotten there. I was wondering if I could ask for two more “add on”. I can’t wrap my head around the code in the graph to accomplish these two things:

  • On slide 13, can we adjust the graph so that after the 36 spins, the number of times the student won is displayed ? (See slide 4 for how it was done with just one spinner)

  • On slide 14, can we adjust the code so that this table show the whole class results (see slide 5)?

Here’s the link to the updated activity:

https://teacher.desmos.com/activitybuilder/custom/61270d9fe08b800982f2c5f2

This should be working. I didn’t get a chance to bug test the aggregate on slide 14, so let me know if something seems a bit off.

I really want to learn this Demos CL in more details… Any tips where I can start?

There are lots of avenues to explore, but combinations of these things will help:

  1. Get to know the CL documentation
  2. Try the CL scavenger hunt
  3. Look at the code in activities authored by Desmos
  4. Try answering some of the questions posted on this forum

This has really elevated my capacity.

1 Like

Our support team has also done a great job recently of reimagining our help center:
https://help.desmos.com/hc/en-us/articles/4405012401165-Introduction-to-Computation-Layer

2 Likes
  1. Get to know the CL documentation. Yes. I need to sit and do that.