More Than I Can Chew

Hi there! So I am just starting out on CL and I may have bitten off more than I can chew.

I am trying to have students guess if a shirt was worn by someone with Parkinson’s or by someone who does not have Parkinson’s.
So I have a media component of a plain white shirt.
A multiple choice component with the choices “Parkinson’s” and “No Parkinson’s.”
A button component that I would like to reset each time it is clicked so they can do all 12 guesses on one page.
A table component that I would like to have fill in their guess, the correct answer, and whether or not their guess was correct.
I would like to have each answer be randomly generated with 6 of them being “Parkinson’s” and 6 of them being “No Parkinson’s.”

I’ve been reading and reading and trying to figure this out but I need some help or I need someone to tell me that I’m doing to much and it is an impossible feat.

Below is the link to the activity. Slide 6 is the problem slide.

Thank you so much for your help!

Fun activity! This isn’t impossible…I think I have most of what you asked for except for the equal distribution of random numbers. I have the code set for the first three rows on slide 6. Basically, I set the action button to capture which choice was selected each time and created a numberList with those values. That list is stored in the graph on slide 7 (sorry I deleted all the previous code on slide 7 because there were errors). Hopefully this gives you a good start.

Just wondering, are you going to be using this with Chi-Squared test?

Great activity!

You can create a balanced set of guesses by creating a hidden graph component with a number list with 6 1s and 6 0s, and then use the shuffle option (which will take a seed parameter that you could set from CL)

https://www.desmos.com/calculator/1h02yly2hu

1 Like

That’s awesome! Thank you so much. One question though:

What does “G_{uesses}[1]” do?

This is my day 1 activity for AP Stats. I got it from the Stats Medic website.

G_{uesses} is the numberList that was created in slide 7 based on the user’s guesses on slide 6, so the number in brackets is the position of the number in the list.

Very cool! Just FYI-- do you know of TinkerPlots?

Questions:
How do I use the shuffle option? I can seed the shuffle using how many times they have clicked the action button, but how do I take the six 1’s and six 0’s from the graph and output them as solutions into my table?

You would assign the shuffled list to a new variable name, and then export that into CL using the numberList source.

1 Like

Do I assign the shuffled list to a variable inside the “edit graph” section? So say I click on “edit graph” and I put
b=((N-n).join(N)-1/2,a.shuffle(s_eed))

Then from my graph’s CL, I would input something like
numberlist(“b”):???

and that is where I get lost again. I am sorry for asking so many questions. I am extremely new at this.

The x values were just there to show off the points.

In the graph you would use

s_eed=0
n=6
N=[1...n]
a=(N/N).join(N-N)
b = a.shuffle(s_eed))

and in the CL you would have something like:

rand = randomGenerator(ab.pressCount)
number("s_{eed}"): rand.float(0,10)
b= this.numberList("b")

In the graph, n gives you the number of 1s and 0s you want, so the total number of values will be 2n
N is just a list of number from 1 to n, which happens to be an easy way to get a list of a particular length.
N/N divides each value by itself, give you a list of n 1s.
Similarly, N-N gives you a list of n 0s.
Those are joined together to make the total list in a, and then randomized with the seed for b

In the CL, the seed is tied to the number of presses of an action button AB, and then b is extracted as a number list.

CL is not great and manipulating number lists, so you’ll probably end up having to check each value using elementAt.