This post has been de-listed
It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.
I'm a newbie to python. And for my first independent project I simulated Samuelson's problem as narrated in Daniel Kahneman's book "Thinking Fast and Slow" using Python. I know this is not as awesome as some of the other projects shared by people here. But, I was so excited to complete this that I wanted to share it with the people who helped me learn so much about Python.
Samuelson's Problem Samuelson famously asked a friend whether he would accept a gamble on the toss of a coin in which he could lose $100 or win $200. His friend responded, βI wont bet because I would feel the $100 loss more than the $200 gain. Iβll take you on if you promise to allow me to make 100 such bets.
......Daniel Kahneman then goes to say
ββ¦the aggregated gamble of hundred 50-50 lose $100/ gain $200 has an expected return of $5,000 with only a 1/2300 chance of losing any money and a 1/62,000 chance of losing more than $1000β
So, I was a little curious about this and decided to simulate this experiment for coin toss hundred times and plotted the total money earned/lost against the instance of experiment. I did the experiment a total of 100 times and not once did the total money outcome result in a loss. I was matplotlib to plot the bar graph.
[Here's the chart(https://i.imgur.com/pAA9kUw.png)
EDIT: Here's the code if anyone is intereseted.. I know it's not the most efficient coding. Any feedback is welcome.
Subreddit
Post Details
- Posted
- 5 years ago
- Reddit URL
- View post on reddit.com
- External URL
- reddit.com/r/Python/comm...