Standing Ovation Problem - v1

Standing Ovation Problem - v1 preview image

1 collaborator

Army_coat_pix R. Wade Schuette (Author)

Tags

peer pressure 

Tagged by R. Wade Schuette about 1 year ago

psychology 

Tagged by R. Wade Schuette about 1 year ago

sociology 

Tagged by R. Wade Schuette about 1 year ago

standing ovation problem 

Tagged by R. Wade Schuette about 1 year ago

Visible to everyone | Changeable by the author
Model was written in NetLogo 6.1.1 • Viewed 203 times • Downloaded 7 times • Run 0 times
Download the 'Standing Ovation Problem - v1' modelDownload this modelEmbed this model

Do you have questions or comments about this model? Ask them here! (You'll first need to log in.)


WHAT IS IT?

This is a very simple implementation of the SOP ( Standing Ovation Problem) that Scott E. Page uses in his Model Thinking on-line class. A paper describing it is linked below.

The situation modeled is this: Patrons visit a live performance at the theater. At the end of the performance, each patron makes a decision to stand up or not. The question is, will a "standing ovation" occur -- that is, will everyone stand?

Version 1 of this model had a bug which caused all patrons to have the same threshold for standing in pass-2 so either no one stood or everyone stood. That has been fixed in this version.

HOW IT WORKS

This model uses two steps to see if a standing ovation occurs.

On "setup", the patrons enter the theater and are seated in random locations. Then a new performance occurs, with absolute quality Q.

Each patron has a somewhat different concept of how good they personally thought the performance was, modeled as a signal S, computed as S = Q + error, where errors are randomly selected from a uniform distribution spanning from -E to +E.

Each patron has a somewhat different threshold T for how good a performance has to be for them to stand up on their own. Those who perceive S > T stand up. That ends step 1.

Then, in step 2, everyone looks around to see how many people also stood up. If that percent is above their personal peer-pressure threshold X, even if they originally decided to stay seated, they will now also stand up. In this version of the SOP, no one ever elects to sit down again if very few other people also stood up in step 1.

HOW TO USE IT

The user uses the slider to set the number of patrons attending, possibly changes other parameters using the sliders and switches, or not, and clicks SETUP. The patrons are shown in the theater, color-coded grey to indicate they are seated. The count of patrons is printed at the bottom, in the "Command Center".

Then the user clicks the STEP button, and the model computes who will stand up right away for these settings of the parameters. The show Quality is computed, and the Quality and number standing after pass 1 is printed in the Command Center. Those who stood in this pass are now color-coded green.

Then the user clicks the STEP button one more time. The model computes who will stand on the second pass, and color-codes them yellow. Summary counts for who stood on each pass are printed at the bottom, along with an evaluation of whether a standing ovation occurred or not.

If the user prefers, instead of clicking STEP twice, they can click RUN once and it will run both steps and then stop.

After the model has completed, hitting STEP or RUN has no effect. The SETUP button must be clicked again to reset the model.

IMPORTANT NOTE:

  • The parameters have to be set BEFORE the SETUP button is clicked, or they won't have an effect for that run.

THE BAR-CHART DISPLAY ( HIDDEN "EASTER EGG")

There is a second hidden feature in the model. If you set the size of the population to 1, then click SETUP and RUN, what you get displayed instead is a bar-chart illustrating what the calculations are looking at. It has no labels (sorry).

The absolute quality Q could vary from zero at the left of the white bar to 100 at the right, and the actual value randomly selected for it on this particular run is shown by the vertical blue bar.

The quality perceived by the users is bounded by the blue horizontal bar, centered on the blue vertical bar. For high levels of E, the blue bar will be wide. For low levels of E, it will be narrow. For E = 0, all users perceive quality level Q.

The threshold of perceived quality for the second pass ( peer-pressure ) is shown as a vertical black bar.

The combination of factors representing standing patrons is shown in green. That is the green area shows how many people will be standing, at the end of the second pass, given the parameters the user picked befor hitting SETUP.

The percent of patrons standing will be the width of the green area divided by the total width of the blue horizontal line, capped at 100%.

The values for Q, E, T, and percent standing, statistically, after pass 1 are printed in the Command Center. note: Computations for the end of pass 2 are not shown.

The value of S, that is Q + error, that was randomly selected given the parameters chose, for this one patron is shown as a red vertical bar. That number does not affect the computed percent that would be standing, statisticall -- it's just to confirm that the model is doing what we wanted it to do.

INTERFACE CONTROLS

SETUP, STEP, and RUN:

The model can be run by simply clicking SETUP and then RUN.

To stop mid-stream after pass 1 to check things out, you can clilck SETUP then STEP, and click STEP a second time to complete the run.

Sliders set the base values for the controllable parameters, and little switches next to the sliders control whether the model will add random variation to that base value or not. For a completely deterministic model, set all the switches OFF.

The sliders are as follows:

POPULATION: sets how many people will attend the show.

QUALITY: sets the absolute quality Q of the performance

THRESHOLD: sets the threshold T for comparison to perceived quality ( Q + error) to be compared to. If perceived quality exceeds T, the person stands in pass 1.

ERROR-MAX: sets the size of variation users might have around Q. Variation is always pulled from a uniform distribution in the range -E to E

X-%: Sets a second threshold -- for what percent of people need to be
standing at the end of the first pass for a person still seated to then stand up on the second pass.

THINGS TO NOTICE

  • If you set the population to 1, you get a bar-chart instead of a picture of people.

THINGS TO TRY

  • If you set the population to 1, you get a bar-chart instead of a picture of people.

  • If you shut off all the randomizing switches, with a population of 1, and set Error-max to zero ( no diversity ), confirm that if Q is less than T, there is no green area ( no one stands at all) and if Q is greater than T, everyone stands on the first pass.

  • If Quality is below Threshold, but there is diversity ( E > 0 ) you can still get mamy people standing. Try Q=45 and T=50 and vary the diversity E from zero to 100, and see what happens to the percent standing.

EXTENDING THE MODEL

See the paper cited below by Miller and Page for many directions to extend the model.

People might sit in rows, and only be influenced by people immediately around them, or in a cone of vision in frot of them. People might have another threshold controlling whether they will sit down again if fewer than that percent of people are standing at the end of pass 1.

NETLOGO FEATURES

No special features were used in this model.

RELATED MODELS

A model named "Standing ovation problem replica" was uploaded to the Modeling Commons 5 years ago by Jean van Haperen. It's written in NetLogo 5.0.5.

CREDITS AND REFERENCES

Scott E. Page's coursera course on Model Thinking https://www.coursera.org/learn/model-thinking

The Standing Ovation Problem, by John H. Miller and Scott E. Page, April 13, 2004 http://www2.econ.iastate.edu/tesfatsi/StandingOvation.MillerPage.pdf

Scott E. Page research on Diversity https://sites.lsa.umich.edu/scottepage/research-2/diversity-research/

Author: Version 1 of this model was developed by R. Wade Schuette, uploaded 23-Nov-2019

Comments and Questions

Please start the discussion about this model! (You'll first need to log in.)

Click to Run Model

globals [
  ;; these are defined in the interface sliders
  ;; error-max    ;;  "errors" ( diversity or E ) will be on [-Error-max, Error-max],
                  ;;  with the largest range used being [-1,1]
  ;; population   ;;  number of people in the theater
  ;; quality      ;;  absolute quality of the show, ie Q
  ;; error-size   ;;
  ;; threshold    ;; threshold signal that causes agent to stand up if randomization is not turned on
                  ;; where signal = Quality + Error
  ;;
  ;;
  pass              ;; which pass, 1 or 2
  T                 ;; threshold for standing on pass 2, same for everyone
  ;; quality        ;; actual quality of the perforance ( ie Q )

  sitting-color     ;;
  standing-color    ;; stand up on pass one
  persuaded-color   ;; stand up on pass two
  percent-standing       ;; count of patrons standing at end of pass 1
  percent-standing-final ;; percent standing at end of pass 2
  percent-persuaded      ;; percent persuaded by peer-pressure in pass 2
  standing-ovation?      ;; true or false
  verbose?               ;; set to true for debugging
]

turtles-own [
  my-signal-threshold   ;;        this is an individual threshold for comparing to perceived quality ( S = Q + error )
  my-peer-pressure-threshold ;;    % of audience standing that will cause  me to stand on pass two, if I am not already standing from pass 1
  my-error       ;;  chosen from a random distribution from -E to E
  my-signal      ;;  after a play, compute this as actual-quality plus my-error, so ranges from -E to (100 + E)
  standing?      ;;  initially false
]

to setup
  clear-all
  set verbose? false
  set standing-ovation? false
  set sitting-color grey
  set standing-color green
  set persuaded-color yellow

  ;; we have a performance, set the quality
  if random-Q? [ set quality random 101 ]

  create-turtles population [ setxy random-xcor random-ycor  set size 3 set shape "person" set color blue]
  ask turtles [

    ;; errors are always randomized, but the error-max can be slid to zero
    set my-error uniform error-max

    set my-signal-threshold threshold ;;
    if random-T?  [set my-signal-threshold random 101 ]  ;; hmmm, question - does it make sense for both  S and T bo be randomized, and if so,
                                                         ;; is random-T chosen on U[0,100] or some other distribution centered on global threshold?

    set my-signal -999  ;;  Set after the show ends to Q + E

    set my-peer-pressure-threshold x-percent
    if random-X? [ set my-peer-pressure-threshold random 101 ]




    ;; they are sitting so
    set standing? false
    set color sitting-color
  ]
  print ( word population " patrons were seated.")
  reset-ticks ;;  ticks starts at 0 not 1
end 

to-report uniform [eee]
     let ranger (2 * eee )
     let xc random (ranger + 1)  ;; x will be an integer between 0 and 2E
     set xc ( xc - eee )         ;; now x is between -E and E inclusive
     report xc
end 

to go
  set pass ( ticks + 1 )     ;; because ticks start at 0
  if ( pass > 2 ) [ stop ]  ;; two passes is all that is needed to run the model

  if verbose? [ print (word "this is pass #" pass) ]
  if (ticks = 0) [
    print (word  "The show quality was " quality )
   ]  ;; the show happens

  if ( pass = 1 )
 [ ask turtles   [
    if verbose? [print ( word "Patron " who " is doing the first pass with show Q = " quality )]


       ;; compute my signal, that is, how I perceive the show
        ;;;;;;;;;;;;;;;;;;;;;;;;;set my-error uniform error-max

       set my-signal (quality + my-error) ;; the play's quality as I see it


    if verbose? [    print ( word ".... my-error = " my-error ", my-signal = " my-signal ", and my-signal-threshold = " my-signal-threshold)]

      ;; then I stand up if my-signal is over my-signal-threshold

       if-else ( my-signal > my-signal-threshold ) [
         if verbose? [  print "....standing up" ]
         set standing? true
         set color standing-color
        ]
        [
      if verbose? [ print ".... remaining sitting."]
    ]
    if verbose? [ print " " ]
  ]
    set percent-standing  ( 100 * count turtles with [ standing? = true ]) / ( count turtles )
    print (word "At the end of the first pass,  percent standing = " precision percent-standing 0)
    if verbose? [print " "]
  ]  ;; end of pass 1

   if (pass = 2 )
   [


    if verbose? [print (word "Starting second pass, with percent standing after passs 1 = " percent-standing)]
   ;; if ( percent-standing > X-percent )[ ask turtles with [standing? = false]  ;;  in version 1, this is wrong, tests global setting

   ask turtles with [standing? = false]  ;;  in version 2, this is better
      [
          if ( percent-standing > my-peer-pressure-threshold )[                      ;; this tests each individual person's threshhold
               set standing? true
               if verbose? [print (word "Patron " who " now stands up")]
               set color persuaded-color ]
      ]

    ;; ok now count again
    set percent-standing-final 100 * ( count turtles with [ standing? = true ]) / ( count turtles )
    set percent-persuaded 100 * count turtles with [color = persuaded-color] / (count turtles )
    if-else  percent-standing-final = 100 [ set standing-ovation? true ][ set standing-ovation? false]

    wrap-up-show
  ] ;; end of pass 2

  tick
end 

to wrap-up-show
    print " ========================================="
    print ( word " The show quality was " quality )
    print ( word " At the end of the first pass,  percent standing  : " precision percent-standing 0)
    print ( word " Then, this percent was also persuaded to stand up: " precision percent-persuaded 0)
    print ( word " So, the final total percent standing             : " precision percent-standing-final 0)
    if-else ( standing-ovation?  )
          [ print "   Standing ovation!"]
          [ print "   Did not get a full standing ovation"]

  ;;  print " ========================================="
  ;;  print " update graphs and output here "

  let show-text (word "For Q=" quality ", T=" threshold ", E="  error-max ", X=" X-percent ", %pass-1=" precision percent-standing 0 ", %pass-2="  precision percent-persuaded 0 " %total=" precision percent-standing-final 0)                                   ;;////////////////////////////////////////////////////////////////////////////
  print show-text
  ;;  print " ========================================="

  if population = 1 [ display-visual ]
end 

to display-visual ;; for only one turtle


  let my-T 0
  let my-E 0
  let my-S 0
  let my-Q quality

  ask turtle 0 [ set hidden? true
  set my-T my-signal-threshold
  set my-E my-error
  set my-S my-signal
  ]

  analyze-one-Emax error-max my-Q   my-T my-S  ;; this is the one to come home to
end 

to analyze-one-Emax [ amax my-Q   my-T my-S ]

  ask patches [ set pcolor gray]
  ask patches with [ pxcor > -10 and pxcor < 10 and pycor < 3 and pycor > -3 ] [ set pcolor white ] ;; 21 patches wide, each about 5 points
  let white-count count patches with [ pcolor = white ]

  ;; make a vertical black bar at T
  let plot-T ( my-T / 5)  - 10
  ask patches with [ pxcor = round plot-T and pycor < 3 and pycor > -3 ] [ set pcolor black ]

  ;; make a blue short vertical bar at Q
  let plot-Q ( my-Q / 5) - 10 ;
  ask patches with [pxcor = round plot-Q and pycor > -1 and pycor < 6 ] [ set pcolor blue ]

  ;; make a red short vertical bar at S ( what the dice actually rolled )
  let plot-S ( my-S / 5) - 10 ;
  ask patches with [ pxcor = round plot-S and pycor < 3 and pycor > 0 ] [ set pcolor red ]


  ;; clear out old blue bar
  ;; ask patches with [  pycor = 3 ]  [ set pcolor white]

  ;; make a new blue horizontal bar showing what the dice MIGHT have rolled ( ie, Q - E to Q + E)
  let lefter  (my-Q - amax)
  let righter (my-Q + amax)
  set lefter  round ( ( lefter  / 5 ) - 10);
  set righter round ( ( righter / 5 ) - 10);
  ask patches with [pxcor >= lefter and pxcor <= righter and pycor = 3 ]  [ set pcolor blue]

  ;; mark possible places the red bar could land that would result in standing up on the first pass
  ask patches with [pxcor > plot-T and pxcor <= righter   and pycor < 3 and pycor > -3 ][ set pcolor green]

  ;; compute the odds of standing with these settings ( Q and T fixed,  S has uniform distribution around Q of half-width E )
  let green-count count patches with [ pcolor = green and pycor = 0 ]  ;; count values of S that result in standing
  let blue-count  count patches with [ pcolor = blue  and pycor = 3 ]  ;; count possible values S could take on
  let stand-pct ( 100 * green-count / blue-count)

  ;; BUG -- truncated pct at 100 max instead of locating the bug in my code!  ////////////////////////////////////////////////////

  if (stand-pct > 100 ) [ set stand-pct 100 ]
  print (word "Given E = " amax  " ,  Q = " my-Q " , T= " my-T ",  the odds of standing in pass 1 are " round stand-pct " percent" )

  ;; and clean up the display out of order to put the red on top of the green
  ask patches with [ pxcor = round plot-S and pycor < 3 and pycor > 0 ] [ set pcolor red ]
end 

There are 2 versions of this model.

Uploaded by When Description Download
R. Wade Schuette 12 months ago fixed bug in %X, added B.S. expts Download this version
R. Wade Schuette about 1 year ago Initial upload Download this version

Attached files

File Type Description Last updated
Standing Ovation Problem - v1.png preview preview image of run showing some people still seated after pass 2 12 months ago, by R. Wade Schuette Download
standing-ovation-v2 experiment-2-sweep-Q-table.csv data BehaviorSpace run showing sensitivity of %-standing to values of Q from 0 to 100 12 months ago, by R. Wade Schuette Download
standing-ovation-v2-overview.png png View of interface and output for run of V2 model 12 months ago, by R. Wade Schuette Download

This model does not have any ancestors.

This model does not have any descendants.