Showing posts with label Expected value. Show all posts
Showing posts with label Expected value. Show all posts

Tuesday, 21 October 2025

Will large language models become gambling addicts?

Concerns about algorithmic bias predate the development of large language models. Cathy O'Neill wrote an entire book, Weapons of Math Destruction (which I reviewed here back in 2017), that outlines the problems. Many of the issues that O'Neill raised have become the worries that many commentators express about large language models. In particular, there is concern that because large language models are trained on a corpus of human writing, that they have internalised human biases. The worst aspects of that are trained out of models, but it is clear that training is imperfect, and some biases remain.

In a new working paper, Seungpil Lee, Donghyeon Shin, Yunjeong Lee, and Sundong Kim (all Gwangju Institute of Science and Technology) ask the question, can large language models develop gambling addiction? The question isn't as crazy as it at first seems. If large language models have internalised human biases, then perhaps they have internalised heuristics and behaviours as well, including humans' less than rational approach to gambling. Lee et al. focus on particular aspects of gambling behaviour:

From a behavioral perspective, the core features of gambling addiction are loss chasing and win chasing. Loss chasing refers to continuing to gamble to recover losses from gambling, and is one of the DSM-5 diagnostic criteria for gambling disorder... Win chasing is explained by the House Money Effect, where winnings from gambling are perceived not as one’s own money but as free money, leading to riskier betting...

They also note that:

Representative examples of gambling-related cognitive distortions include the following. First, misunderstandings about probability, including gambler’s fallacy (the belief that “it’s my turn to win” after a losing streak) and hot hand fallacy (the belief that a winning streak will continue)...

Lee et al. analyse gambling behaviour by getting a selection of large language models to repeatedly play a slot machine game, where the game had a 30 percent chance of paying out three times the amount that was staked. That game has a negative expected value, since on average over many plays of the game the average is negative 10 percent [*]. As they explain:

...this study applied a slot machine task with a negative expected value (−10%) to four different LLMs: GPT-4o-mini (OpenAI, 2024b), GPT-4.1-mini (OpenAI, 2024a), Gemini-2.5-Flash (Google, 2024), and Claude-3.5-Haiku (Anthropic, 2024). A 2 × 32 factorial design was employed to manipulate two factors: Betting Style (fixed $10 vs. variable $5–$100) and Prompt Composition (32 variations). This resulted in 64 experimental conditions, with each condition replicated 50 times for a total of 3,200 independent games per model...

The experimental procedure began with an initial capital of $100, with the slot machine set to a 30% win rate and a three times payout. The LLM was presented with a choice to either bet or quit; in rounds subsequent to the first game, information about the current balance and recent game history was also provided.

Lee et al. then look at the behaviour of each model, in particular whether each model engaged in win chasing (by increasing the size of bets, or being more likely to continue playing, if the model was on a winning streak), or loss chasing (the same, but for losing streaks). They create more complicated indices, but I think the simpler approach is more intuitive and pretty clear, as summarised in Figure 5 in the paper:

Across all the models on average (which is what the figure shows), there is substantial continuation (in the right panel). The models tend to want to play again, regardless of whether they are winning or losing, or on a streak. In the left panel, there is strong evidence of win chasing (the green bars). The models increase their bet when they have a win streak. Even worse, the longer a win streak continues, the more likely it is that models will increase the size of their bet. There is evidence of loss chasing as well (the red bars), but the effect isn't accelerating in the way that it is for win chasing. Large language models' gambling behaviour exhibits at least some of the features that human gambling behaviour does.

Interesting, the more complex the prompt, the more the models exhibited these behaviours. Lee et al. then go on to show that these effects are distinguishable in terms of 'distinct neural patterns' within the model. I won't pretend to understand the intricacies of the computer science there, but essentially they establish that it is the underlying model itself, rather than just the prompt, that drives the gambling behaviours. Lee et al. conclude that:

These findings reveal that AI systems have developed human-like addiction mechanisms at the neural level, not merely mimicking surface behaviors.

I guess the takeaway is that the more that generative AI is training on a corpus of human knowledge and writing, the more like humans they become. Perhaps White Zombie said it best [**]:

[HT: Marginal Revolution]

*****

[*] To calculate the expected value of this gamble, we take each outcome and multiply by the probability that it occurs, then add them up. In this case, the outcomes and probabilities are a 30 percent probability of receiving 300%, and a 70% probability of receiving zero. The expected value E(X) = 0.3 x 3 + 0.7 x 0 = 0.9. So, for every one dollar staked, the expected payout is 90 cents - the gambler on average receives less back than what they bet. This is characteristic of most real-world gambles such as Lotto, casino roulette, and so on.

[**] Fittingly, this song was inspired by the movie Blade Runner. The song's title, "More human than human" was the motto of the Tyrell Corporation in the movie. The song samples audio from the movie, and directly quotes it in a few places in the lyrics.

Friday, 4 January 2019

Gender differences in multiple choice answering

In a post in 2017, I discussed multiple choice and constructed response questions in exams. One of the key points of that post was to highlight the gender difference in performance in multiple choice questions (female students do worse, but they do better on constructed response questions). It turns out that result is fairly common in the academic literature, but the reason why female students don't perform as well as male students on multiple choice questions is less clear. Maybe it is that female students don't respond well to high pressure or competitive situations (and multiple choice questions are reasonably high pressure). Women are more risk averse than men, so maybe it is related to that? Female students might be more likely to skip questions in order to avoid the risk of losing marks [*]. Also, men are more overconfident than women, so maybe it is related to that? Again, male students might be less likely to skip questions, because they are less likely to be unsure they have the right answer.

So, I was quite interested to read this 2017 article by Gerhard Riener and Valentin Wagner (both Düsseldorf Institute for Competition Economics), published in the journal Economics of Education Review (sorry, I don't see an ungated version, but it looks like it might be open access anyway). Riener and Wagner conduct an experiment with 2060 German secondary school students across 89 classes in 25 schools, who each sat a maths test (based on the Math Kangaroo questions).

There were three levels of questions (easy, worth 3 marks; medium, worth 4 marks; and difficult, worth 5 marks). Students lost one mark for every question they got wrong. So, there is an incentive not to guess the easy questions if you don't know (because there is a 1/5 chance of getting three marks, and a 4/5 chance of losing a mark, so the expected value of guessing is -0.2 [0.2 * 3 + 0.8 * -1]). There is no incentive either way for the medium questions (the expected value is 0 [0.2 * 4 + 0.8 * -1]), and a positive incentive to guess on the difficult questions (the expected value is 0.2 [0.2 * 5 + 0.8 * -1]). So, Riener and Wagner expect students to skip more of the easy questions, and fewer of the difficult questions. It turns out that wasn't the case, since they:
...find that the number of skipped questions is increasing in difficulty.
I'm not surprised by this at all. Students don't understand expected value, so it wouldn't surprise me that they didn't realise that there was a positive expected value for guessing, for the difficult questions. And the positive expected value is a relevant consideration for a risk neutral decision-maker. Since there were only 14 questions in the test (and only 4 difficult questions), then it is relatively risky to guess on one of them, in terms of the impact on overall score.

That wasn't the main results from the paper though, which concerned the gender differences, and the experiment. The experiment was that students in some classes were rewarded, if their test score was better than their earlier mid-term result (they didn't know about the experiment until after the mid-term, so there is no risk of the students engaging in strategic behaviour). The reward (according to Riener and Wagner, a source of extrinsic incentive to do well in the test) was one of: (1) a medal, awarded in front of the rest of the class; (2) a letter to their parents, praising their good performance; (3) a "no homework" voucher, which entitled them to take a day off homework; or (4) a "surprise gift" (which was actually a combination of (1) and (2)).

They find that:
Females always tend to skip more questions than males regardless of whether they are incentivized or not. However, incentivized pupils tend to skip fewer questions than non-incentivized pupils...
...girls in our low stakes baseline treatment skip significantly more questions than boys... However, the gender gap depends on item difficulty. While girls skip as many questions as boys when items are easy... they skip significantly more questions for medium... and difficult questions... Interestingly, providing extrinsic incentives for performance, and hence increasing the stakes, closes the gender gap in skipping test items. 
So, providing an incentive closed the gender gap. They also find that the gender gap is only present in academic high schools (Gymnasium) and not in vocational high schools (Gesamtschule, Realschule, and Hauptschule). However, I'm not convinced by those results, as the vocational students sat an easier test, with fewer questions used in the analysis, which renders the results not comparable with the academic high school students.

Riener and Wagner argue that their results are:
...suggestive evidence that the gender gap could be explained by a stereotype threat. Girls in high school only skip significantly more questions if the questions are difficult, although the attractiveness of answering is higher for difficult questions than for easy questions. Further support for a stereotype threat explanation is the fact that the gender gap vanishes if the difficulty of the task is made less salient (shifting the focus of pupils to winning an extrinsic reward).
It's possible that this is stereotype threat. However, it is also possible that the types of rewards that they were offering were the types of rewards that girls value more than boys (especially given that the students got to choose their preferred reward). Perhaps the reward increased the stakes of the test for girls, but not for boys? In any case, it's hard for me to see how the offering of the reward reduces stereotype threat. So, although they were able to eliminate the gender difference in performance, I don't think this paper really helps us get to the bottom of why female students usually perform worse than male students in multiple choice questions.

*****

[*] This applies if there are negative marks for a wrong answer. It is a bit harder to argue this when there is no penalty for a wrong answer (or at least, no difference in the penalty between skipping and getting the answer wrong).

Read more:


Friday, 25 August 2017

Rational ignorance is why we don't check our supermarket receipts

Last week, news.com.au reported:
WHEN you go shopping, do you casually throw your receipt in with the groceries, neglecting to read it over?
Or, worse, do you decline to print one out and walk away, ignorant what you’ve paid for all those carefully-selected items?
If you answered “yes”, you could be ripping yourself off, with scanning errors causing supermarkets to overcharge for everyday items — and many shoppers failing to detect, or act upon the mistakes to recoup what they are owed.
A survey of 2,141 Australians by comparison site finder.com.au found that two in five people had been overcharged at the till in the past year.
But one-quarter said they didn’t bother checking their dockets and, of those who did, they would only bother going for a refund if they were overcharged by more than $10.
There is a good reason why supermarket shoppers don't check their receipts. It takes time and effort to check those receipts, and the chances that the time and effort you spend pays off by your finding an error in your favour is low.

To illustrate, let's construct a plausible numerical scenario. Let's say that "two in five people" have been overcharged once each in the past year (as noted in the quote above), making a 40 percent chance that you've been overcharged once in the past year [*]. So, on average each person has been overcharged 0.4 times in the last year (some have been overcharged more times, and some have been overcharged fewer times). Let's assume each person goes to the supermarket roughly once per week (say 50 times per year). So, on average each shopper is being overcharged 0.4 times in 50 shopping trips, or a 0.8 percent chance that any given shopping trip results in an overpayment. Now let's generously assume that in each shopping trip where a shopper is overcharged, they are overcharged by $10 [**]. The expected value of checking every supermarket receipt is 0.8% x $10 = $0.08 (yes, that's EIGHT CENTS). This is the expected (or average) benefit you would gain from carefully checking every supermarket receipt to make sure you haven't been overcharged.

If the cost, in terms of time and effort, of carefully checking a supermarket receipt is more than $0.08, a rational person wouldn't do so. You would be better off to remain rationally ignorant of whether you overpaid the supermarket. Even at the minimum wage, $0.08 is the pay for about 18 seconds. Taking the minimum wage as the cost of people's time, you wouldn't want to spend any more than 18 seconds scrutinising each supermarket receipt. If your implicit value of time is higher than the minimum wage, you'd want to spend even less time than that.

You might argue that people are loss averse, so that they value losses much more than gains. Losing money to overcharging is a loss, so we should value the expected loss at much more than $0.08. However, it isn't a loss if you don't know about it! You're still better off being rationally ignorant, even if you're loss averse (maybe especially if you're loss averse).

I'm not surprised supermarket shoppers don't carefully scrutinise their receipts to check for overpayments on every item. It simply doesn't pay off for us.

*****

[*] Probably some people had been overcharged multiple times, but I don't think that will make much difference to this example.

[**] Probably most instances of overcharging are much less than $10. In my experience, overpayments I have caught in my own shopping trips (usually because I happened to be looking at the screen when the item was scanned and remembered the price) have been a couple of dollars at most.