Coming soon - Get a detailed view of why an account is flagged as spam!
view details

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.

347
I simulated a thought experiment from Daniel Kahneman's book "Thinking Fast and Slow" using Python.
Post Body

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.

Author
Account Strength
100%
Account Age
8 years
Verified Email
Yes
Verified Flair
No
Total Karma
38,830
Link Karma
24,928
Comment Karma
13,902
Profile updated: 4 days ago
Posts updated: 1 year ago

Subreddit

Post Details

We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
5 years ago