Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X
Happy New Year!
This month’s challenge is based around statistics, specifically permutations and combinations around shuffling a deck of cards. It’s inspired by this article:
Your challenge, should you choose to accept it, is to perform the following in Mathcad Prime:
As always, documentation is key. Create your worksheet in a manner that someone can understand it on its own.
Find the Mathcad Community Challenge Guidelines here!
OK, I'll jump in as its still January 1st over here and my avatar feels addressed by the task 😉
Some remarks:
I wouldn't say that the task is based around statistics but rather enumerating combinatorics and basic probability.
I don't think you really mean the number of ways we can shuffle a deck of cards. Because this would mean that we have to count methods like Overhand shuffle, Riffle (Dovetail) shuffle, Hindu shuffle, etc, -> https://en.wikipedia.org/wiki/Shuffling
You rather sure mean the number of ways the cards can be arranged in sequence.
When you ask for the 50% probability you say "How long would it take to shuffle the face cards until there’s a 0.5 probability you’ve shuffled the same way twice? "
That's a bit unclear and you sure mean a probability of 50% or higher, don't you? Otherwise I guess there would be no solution.
Furthermore I guess you may mean twice or more and you would also be happy if the card arrangements achieved contain even more than just one pair of duplicates, correct?
I interpret that question similar to the well known Birthday-Problem, where the question is about the probability of at least two persons having the same day of birth (ignoring the year and Feb 29th). Just with 12! and 16! instead of 365.
Does my interpretation match your intention?
For the last but one (the first optional) I had to use the symbolics of Mathcad 15 as Primes was not capable enough and I did not want to resort to approximations and messing around with trial and error.
At least I found a way to get a solution good enough for this task even with Prime by using the Stirling formula and a little trick.
Anyway, find attached my 2 cents worth...
EDIT: Had to exchange the pdf file for one created by a different program because the one created using Primes "Save to pdf" option had some strange errors like (erroneous spaces highlighted in yellow by me)
or
Attacked using Prime 4 Express.
(Nowhere nearly as well documented as Werner's!)
Here is my attempt using Prime Express 8.
I'm no statistical or combinatorial expert so I wouldn't be surprised if my logic is faulty somewhere!
Alan
Edit: pdf file added
Edit 2: pdf file replaced with an easier to read one.
Solution is both clever and lucid.
I haven't seen any ref to the other half of the question - number of atoms in Earth. From memory -
Mass of Earth = 6*10^24 kg.
Approx average atomic mass of Earth (a lot of iron in the core) say = 50.
Avogadro's number = 6*10^26/kmol
Number of atoms = 6*10^24/50*6*10^26 = 7*10^49
52! =8*10^67
Hello, all.
Here is my proposal. I´m not an expert in probability either, but trying is the best way to learn.
Best
Regards
Welcome to PTC Community!
And I like what you said about "trying is the best way to learn." True!
By the way, January 2024 lasts for only one more week. (Went by quick!) So to everyone else lurking, get your submissions in while January lasts, and we'll work to evaluate them in a blog that should release in early-mid February.
What name should I use for you in the blog write-up?
Hi,
You can use my name: Germano Freitas.
Every time I read about shuffling a 52-cards deck, my mind always get blow-away by how big of a number 52! is...
source : https://czep.net/weblog/52cards.html
Start a timer that will count down the number of seconds from 52! to 0. We're going to see how much fun we can have before the timer counts down all the way :
Last chance for this month's Mathcad Challenge! And remember, you can build on someone's previous submission. It is a community challenge.
FYI, everyone has badges and the solution blog is published now!
Look forward to the March challenge coming... well, soon.
https://www.mathcad.com/en/blogs/community-challenge-playing-cards