I’m still working on the Birthday Paradox activity and struggling with a challenge. In the version posted:
The results table can contain duplicates if more than two people have the same birthday
A better approach might be to remove such duplicates and add a third column identifying the number of people with that birthday. That means for each distinct match found counting the number of occurrences of that date in the full list of dates (held in single integer format). My problem is finding a reasonable way to create this list of occurrences. I can see how it can be done with each match individually but is there a way to use a single expression in the Graphing Calculator to achieve the same effect? Thanks in advance!
“It looks like if you make a list of points and the unique( ) function, it will sort out as you desire.”
Thanks Daniel, I didn’t know about the unique() function. I’ve updated the activity linked to this thread to use it but I don’t see how it can help with the completion of the occurrences table? What I think I need is a function to count occurrences of the form “count (x,A)” returning the number of occurrences of the value x in the list A. Do you know of a way to achieve that effect?
I’ve also modified the activity to display the results in a graph but still need to find a way to show cases where more than two people have the same birthday.
Thanks @Daniel_Grubbs & @pirsquared, you have given me lots of new material that I’d like to understand as well as use. I’m not working with points, as the day and month values of each birthday are combined to produce a single list of integers so that may simplify matters. I’ll report back after experimenting.
After experimenting, I now understand the suggestions from @Daniel_Grubbs and @pirsquared, and see how either could be used to solve the problem posted. The suggestion from @pirsquared is the best fit, however, so that is the one I’ve adopted. Both suggestions have moved on my knowledge of Desmos, so again thanks!
Apart from tidying, that probably completes the activity unless someone has a suggestion for improving the ‘heavy handed’ table construction on the second screen, as posted in a separate thread.