Python program to model the solution of the given problem.
$10-30 USD
Selesai
Disiarkan sekitar 2 tahun yang lalu
$10-30 USD
Dibayar semasa penghantaran
A two-envelopes puzzle. You are handed two envelopes. and you
know that each contains a positive integer dollar amount and that the two amounts are
different. The values of these two amounts are modeled as constants that are unknown.
Without knowing what the amounts are, you select at random one of the two envelopes,
and after looking at the amount inside, you may switch envelopes if you wish . A friend
claims that the following strategy will increase above 1 /2 your probability of ending
up with the envelope with the larger amount: toss a coin repeatedly. let X be equal to
1 /2 plus the number of tosses required to obtain heads for the first time, and switch
if the amount in the envelope you selected is less than the value of X . Is your friend correct?
Write a python program to model the problem.
Run several trials, generating two random amounts to put in the envelope, with the amount to be an integer between 1 and 10, uniformly distributed.
Pick one at random, then programmatically flip a coin to model the solution given in the problem.
Run the program for 100 trials, 1000, trials 10,000 trials, 100,000 trials, and 1,000,000 trials
• The number of times the first choice made is cheaper (We expect half).
• The number of times the formula swapped.
• The number of times swapping produced the lower value.
As the number of trials increases, do the ratios of the three values to the number of trials seem to converge to a value?
For proper description see word file.
Hi I am a Mechanical Engineer by trade currently working as a Software Engineer. I have ample experience with Python and can help you complete your project! Please message me and we can talk more in detail. Time and price negotiable.
Best,
MJ
$20 USD dalam 2 hari
0.0 (0 ulasan)
0.0
0.0
8 pekerja bebas membida secara purata $48 USD untuk pekerjaan ini
Python Expert.
As 9+ years experiences in these field. I can give good quality work.
I have read the guidelines of your work.I believe that i can provide you the best quality works you are anticipating from this platfrom give me a chance to show you the best i can do at your service.
Hello, I read your project details and really interested in your mentioned job. I have 5+ years’ experience doing similar jobs related to these skills Python. I think its doable job, and really confident to do that. Please start the chart so we have detail discussion about task and finalize it as per your timeline.
Regards
Umair
I read your description and the attached docx file. This probability-problem is familiar to me and I can model this in Python. I can also answer any questions you may have with this project. Please get in touch via chat to discuss this further. Thanks.
Python Programmer -
Hello there, I am a Python Programmer by profession and have been doing Python based projects for quite a while now.
I have read your job description and I am pretty sure that I can complete every bit of your requirements.I got the experience you require for the project.
You can visit my profile for competence level. Please open the private chat box if you may so that we can discuss more.
Thanks.