INTEGRATIVE STATISTICS
  • Home
  • Services
    • Expert Witness Services
    • Refine Your Question
    • Locate a Technique
  • Past Projects
    • Education
    • Health Care
    • Business
    • Archaeology
  • About
    • Testimonials
    • Contact
  • Blog

Blog

The St. Petersburg Paradox:  Infinite Payouts, and Code You Can Try

6/1/2022

0 Comments

 
Picture
This account draws from George Pipis’s “predictive ‘hacks’” page and Wikipedia.
 
Introduction
The St. Petersburg Paradox results from an imaginary lottery game.  The game pays out winnings that, in the truly long run, are infinite.  Despite this, when people are asked how much they would pay to play, they typically name a small amount such as $20 or $30.
 
How the Game Works
An ordinary coin is flipped until it comes up heads.  When it does, the player wins some amount. If heads occurs on the first flip, the payout is $2.  If on the 2nd flip, $4.  If on the 3rd, $8.  Etc.  You can imagine that it’s possible, though not likely, for the first heads to “wait” until the 14th flip.  In that case, winnings would be 2^14 or $16,384. 
 
How much would you pay for the chance to play?
 
The Paradox
In theory, and in the long run, there is no limit to the amount one could win at this hypothetical game.  Even so, few people say they would risk a large amount.  Wikipedia has good information on why, bringing in work on behavioural economics from researchers such as the legendary pair, Amos Tversky and Daniel Kahneman.
​
Code:  Try It Out Yourself 
The text file below contains several versions of code you can use to simulate results from this game.  Some apply to the R software, and one is designed for SPSS.
Each portion of code contains comments explaining the purpose or function of different commands.
Enjoy, and feel free to share your observations or your feedback about the exercise.

st._petersburg_paradox_in_6_lines_of_code.txt
File Size: 4 kb
File Type: txt
Download File

0 Comments

    Author

    Roland B. Stark

    Note:  posts from before 2022 have been imported from yellowbrickstats.com and thus will initially appear here without "likes" or comments.

    Archives

    July 2022
    June 2022
    May 2022
    March 2022
    May 2019
    January 2019
    October 2018
    June 2018
    March 2018
    September 2017
    November 2015

    RSS Feed

Proudly powered by Weebly
  • Home
  • Services
    • Expert Witness Services
    • Refine Your Question
    • Locate a Technique
  • Past Projects
    • Education
    • Health Care
    • Business
    • Archaeology
  • About
    • Testimonials
    • Contact
  • Blog