20 combat die rolls vs computer in iron man game.

  • We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.
Status
Not open for further replies.

asamy

Software developer
64 Badges
Oct 16, 2009
448
210
  • Sword of the Stars
  • Semper Fi
  • Europa Universalis IV: Res Publica
  • Magicka
  • Leviathan: Warships
  • Hearts of Iron III Collection
  • Hearts of Iron III: Their Finest Hour
  • Hearts of Iron III
  • Sword of the Stars II
  • Warlock: Master of the Arcane
  • Europa Universalis III Complete
  • The Showdown Effect
  • Victoria 2
  • Europa Universalis III Complete
  • War of the Roses
  • 500k Club
  • Hearts of Iron IV Sign-up
  • Europa Universalis IV: El Dorado
  • Magicka: Wizard Wars Founder Wizard
  • Crusader Kings II: Way of Life
  • Humble Paradox Bundle
  • Crusader Kings II: Horse Lords
  • Hearts of Iron IV: Cadet
  • Crusader Kings II: Conclave
  • Cities: Skylines - Snowfall
  • Hearts of Iron IV: Death or Dishonor
  • Cities: Skylines - Parklife
  • Cities: Skylines - Parklife Pre-Order
  • Crusader Kings II: Jade Dragon
  • Europa Universalis IV
  • Cities: Skylines - Mass Transit
  • Crusader Kings II: Monks and Mystics
  • Hearts of Iron IV: Together for Victory
  • Crusader Kings II: Reapers Due
  • Crusader Kings II: Holy Fury
  • Imperator: Rome Sign Up
  • Victoria 2: A House Divided
  • Europa Universalis IV: Common Sense
  • Europa Universalis IV: Pre-order
  • Victoria 2: Heart of Darkness
  • For the Motherland
  • Europa Universalis IV: Call to arms event
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: The Republic
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: Charlemagne
  • Crusader Kings II
  • Cities in Motion 2
Not enough, you need a bigger sample :)
 

grisamentum

Field Marshal
93 Badges
Feb 29, 2012
6.530
1.202
  • Humble Paradox Bundle
  • Crusader Kings II: Sunset Invasion
Not enough, you need a bigger sample :)

not necessarily. if the skew were strong enough we could be sure it was not a "normal" dice from a relatively small sample. disproving the claim "the dice is fair" needs a large set if the skew is small, but smaller set if the skew is much bigger.

here the computer average is 5.048, and the player average is 3.429, so i think perhaps a little investigation is warranted...
 

grisamentum

Field Marshal
93 Badges
Feb 29, 2012
6.530
1.202
  • Humble Paradox Bundle
  • Crusader Kings II: Sunset Invasion
The more important issue here is if he is fighting against a lucky nation, and do lucky nation get bonuses to otherwise "unmodified" combat rolls. Ie is the combat roll 1d10+1 for lucky nations, and 1d10 otherwise?
 

Tom013

Field Marshal
90 Badges
Sep 10, 2012
3.275
790
  • Cities: Skylines - After Dark
  • Europa Universalis IV: Res Publica
  • Semper Fi
  • Crusader Kings II
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • Crusader Kings II: Monks and Mystics
  • Cities: Skylines Deluxe Edition
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Third Rome
  • Crusader Kings II: Charlemagne
  • Knights of Pen and Paper 2
  • Europa Universalis IV: Cossacks
  • Stellaris - Path to Destruction bundle
  • Cities: Skylines - Snowfall
  • Europa Universalis IV: Mare Nostrum
  • Stellaris
  • Crusader Kings II: Jade Dragon
  • Stellaris: Galaxy Edition
  • Hearts of Iron III Collection
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Europa Universalis III: Chronicles
  • Stellaris: Synthetic Dawn
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Call to arms event
  • For the Motherland
  • Hearts of Iron III
  • Hearts of Iron III: Their Finest Hour
  • March of the Eagles
  • Europa Universalis IV: Rights of Man
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Cities: Skylines - Natural Disasters
  • Hearts of Iron IV: Cadet
  • Stellaris Sign-up
  • Hearts of Iron IV Sign-up
  • Europa Universalis 4: Emperor
  • Crusader Kings II: Conclave
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: El Dorado
  • 500k Club
Agreed that the sample size is too low. Even so, the median difference is -1 (i.e. 1 point against you). The mean is just slightly worse at -1.6. Only a couple or rolls are giving the sample set a bias at all...
 

Tom013

Field Marshal
90 Badges
Sep 10, 2012
3.275
790
  • Cities: Skylines - After Dark
  • Europa Universalis IV: Res Publica
  • Semper Fi
  • Crusader Kings II
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • Crusader Kings II: Monks and Mystics
  • Cities: Skylines Deluxe Edition
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Third Rome
  • Crusader Kings II: Charlemagne
  • Knights of Pen and Paper 2
  • Europa Universalis IV: Cossacks
  • Stellaris - Path to Destruction bundle
  • Cities: Skylines - Snowfall
  • Europa Universalis IV: Mare Nostrum
  • Stellaris
  • Crusader Kings II: Jade Dragon
  • Stellaris: Galaxy Edition
  • Hearts of Iron III Collection
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Europa Universalis III: Chronicles
  • Stellaris: Synthetic Dawn
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Call to arms event
  • For the Motherland
  • Hearts of Iron III
  • Hearts of Iron III: Their Finest Hour
  • March of the Eagles
  • Europa Universalis IV: Rights of Man
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Cities: Skylines - Natural Disasters
  • Hearts of Iron IV: Cadet
  • Stellaris Sign-up
  • Hearts of Iron IV Sign-up
  • Europa Universalis 4: Emperor
  • Crusader Kings II: Conclave
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: El Dorado
  • 500k Club
he's not trying to create a "representative sample" of dice roll. he is trying to test a theoretical claim like "the dice is fair."

You cannot test that theoretical claim without a sufficient sample size.

The more important issue here is if he is fighting against a lucky nation, and do lucky nation get bonuses to otherwise "unmodified" combat rolls. Ie is the combat roll 1d10+1 for lucky nations, and 1d10 otherwise?

According to the developers, lucky nations do not get bonuses in combat rolls. If they did get such a bonus, this sample set would appear to match with that for a player vs. a lucky AI (though the sample set is really too small to say this conclusively even so).
 

zodium

Person
31 Badges
Sep 9, 2013
3.313
13
  • Crusader Kings II: Charlemagne
  • Europa Universalis IV: Res Publica
  • Crusader Kings II
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Art of War
  • Europa Universalis IV
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: The Republic
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Legacy of Rome
  • Stellaris: Ancient Relics
  • Stellaris: Megacorp
  • Stellaris: Distant Stars
  • Stellaris: Apocalypse
  • Stellaris - Path to Destruction bundle
  • Crusader Kings II: Monks and Mystics
  • Stellaris: Leviathans Story Pack
  • Stellaris: Digital Anniversary Edition
  • Stellaris
  • Crusader Kings II: Conclave
  • Crusader Kings II: Horse Lords
  • Pillars of Eternity
  • Crusader Kings II: Way of Life
  • Magicka: Wizard Wars Founder Wizard
  • Europa Universalis IV: Pre-order
  • Stellaris: Synthetic Dawn
  • Europa Universalis IV: Call to arms event
Loaded up R, punched in the values:

Code:
> player <- c(1,2,2,3,6,8,2,2,1,4,3,2,1,1,1,2,4,9,5,6,7)
> ai <- c(7,4,3,5,9,9,1,2,3,5,1,2,1,7,8,9,4,9,4,7,6)
> t.test(ai,player)

	Welch Two Sample t-test

data:  ai and player
[b]t = 1.9617, df = 39.24, p-value = 0.05692[/b]
alternative hypothesis: true difference in means is not equal to 0

95 percent confidence interval:
 [b]-0.05002486  3.28812009[/b]

sample estimates:
mean of x mean of y 
 5.047619  3.428571

I'm not going to calculate the power, since it's safe to say you need a bigger sample.
 

grisamentum

Field Marshal
93 Badges
Feb 29, 2012
6.530
1.202
  • Humble Paradox Bundle
  • Crusader Kings II: Sunset Invasion
You cannot test that theoretical claim without a sufficient sample size.

of course you can. you can test any claim with any sample size. it's just that the significance of your result will quite low if you have an unclear result with a smaller sample size. there is no magic "sufficient sample size" and certainly not the 1000 that someone else demanded.

the stronger the result, the smaller the sample size necessary to confirm it. here we don't have a particularly strong result but there is certainly something that merits more investigation.
 

zodium

Person
31 Badges
Sep 9, 2013
3.313
13
  • Crusader Kings II: Charlemagne
  • Europa Universalis IV: Res Publica
  • Crusader Kings II
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Art of War
  • Europa Universalis IV
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: The Republic
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Legacy of Rome
  • Stellaris: Ancient Relics
  • Stellaris: Megacorp
  • Stellaris: Distant Stars
  • Stellaris: Apocalypse
  • Stellaris - Path to Destruction bundle
  • Crusader Kings II: Monks and Mystics
  • Stellaris: Leviathans Story Pack
  • Stellaris: Digital Anniversary Edition
  • Stellaris
  • Crusader Kings II: Conclave
  • Crusader Kings II: Horse Lords
  • Pillars of Eternity
  • Crusader Kings II: Way of Life
  • Magicka: Wizard Wars Founder Wizard
  • Europa Universalis IV: Pre-order
  • Stellaris: Synthetic Dawn
  • Europa Universalis IV: Call to arms event
Isn't 2000 the ideal sample size or something? Didn't pay much attention in statistics class.

As the OP explained, it depends on the magnitude you expect the effect to have. A strong effect can be detected with n as low as 15, at least in Fisherian (what you didn't learn in stats class :V) theory.

of course you can. you can test any claim with any sample size. it's just that the significance of your result will quite low if you have an unclear result with a smaller sample size. there is no magic "sufficient sample size" and certainly not the 1000 that someone else demanded.

the stronger the result, the smaller the sample size necessary to confirm it. here we don't have a particularly strong result but there is certainly something that merits more investigation.

Er, no. If your inference relies on the Central Limit Theorem (if you're not a trained statistician, it does, and if you are, it probably still does), at least, you can forget about using anything smaller than n = 15.
 

HansBaer

Lt. General
20 Badges
Aug 16, 2013
1.337
443
  • Europa Universalis IV
  • Europa Universalis IV: Rights of Man
  • Europa Universalis 4: Emperor
  • Prison Architect
  • Europa Universalis IV: Golden Century
  • Europa Universalis IV: Dharma
  • Europa Universalis IV: Rule Britannia
  • Europa Universalis IV: Cradle of Civilization
  • Age of Wonders III
  • Europa Universalis IV: Third Rome
  • Europa Universalis IV: Mandate of Heaven
  • Europa Universalis IV: Mare Nostrum
  • Europa Universalis IV: Cossacks
  • Europa Universalis IV: Common Sense
  • Pillars of Eternity
  • Europa Universalis IV: El Dorado
  • Europa Universalis IV: Res Publica
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Art of War
Isn't 2000 the ideal sample size or something? Didn't pay much attention in statistics class.

Depends on the standard deviation and probabilities. With dices, 20 throws are utterly useless in any scenario, even if he just got 1s.
I bet i would need max. 30 battles to find one with similar outcomes on player's side.
 

Tom013

Field Marshal
90 Badges
Sep 10, 2012
3.275
790
  • Cities: Skylines - After Dark
  • Europa Universalis IV: Res Publica
  • Semper Fi
  • Crusader Kings II
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • Crusader Kings II: Monks and Mystics
  • Cities: Skylines Deluxe Edition
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Third Rome
  • Crusader Kings II: Charlemagne
  • Knights of Pen and Paper 2
  • Europa Universalis IV: Cossacks
  • Stellaris - Path to Destruction bundle
  • Cities: Skylines - Snowfall
  • Europa Universalis IV: Mare Nostrum
  • Stellaris
  • Crusader Kings II: Jade Dragon
  • Stellaris: Galaxy Edition
  • Hearts of Iron III Collection
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Europa Universalis III: Chronicles
  • Stellaris: Synthetic Dawn
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Call to arms event
  • For the Motherland
  • Hearts of Iron III
  • Hearts of Iron III: Their Finest Hour
  • March of the Eagles
  • Europa Universalis IV: Rights of Man
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Cities: Skylines - Natural Disasters
  • Hearts of Iron IV: Cadet
  • Stellaris Sign-up
  • Hearts of Iron IV Sign-up
  • Europa Universalis 4: Emperor
  • Crusader Kings II: Conclave
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: El Dorado
  • 500k Club
of course you can. you can test any claim with any sample size. it's just that the significance of your result will quite low if you have an unclear result with a smaller sample size. there is no magic "sufficient sample size" and certainly not the 1000 that someone else demanded.

the stronger the result, the smaller the sample size necessary to confirm it. here we don't have a particularly strong result but there is certainly something that merits more investigation.

Uh... okay. Sorry for not being precise enough in my language: You can draw no substantial conclusions about that theoretical claim from such a small sample size. As you put it, "the significance of the result will be quite low" ... and in this case, it is indeed quite low.

There are statistical measures to help you determine what sample size is "good enough." 20 is not it in this case. Take a look at Zodium's post.

Er, no. If your inference relies on the Central Limit Theorem (if you're not a trained statistician, it does, and if you are, it probably still does), at least, you can forget about using anything smaller than n = 15.

Does this mean my lifelong assumption that all things are constant biases needs to be revisited? My sample size of one had me quite convinced. Blast!
 

grisamentum

Field Marshal
93 Badges
Feb 29, 2012
6.530
1.202
  • Humble Paradox Bundle
  • Crusader Kings II: Sunset Invasion
Uh... okay. Sorry for not being precise enough in my language: You can draw no substantial conclusions about that theoretical claim from such a small sample size. As you put it, "the significance of the result will be quite low" ... and in this case, it is indeed quite low.

There are statistical measures to help you determine what sample size is "good enough." 20 is not it in this case. Take a look at Zodium's post.

I did. The p-value is .05692, which means the result in this case is actually almost significant enough to reject the null hypothesis (the dice is fair). I also agreed he needs a bigger sample size, but the result is actually quite close to rejecting the null hypothesis already.
 

zodium

Person
31 Badges
Sep 9, 2013
3.313
13
  • Crusader Kings II: Charlemagne
  • Europa Universalis IV: Res Publica
  • Crusader Kings II
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Art of War
  • Europa Universalis IV
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: The Republic
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Legacy of Rome
  • Stellaris: Ancient Relics
  • Stellaris: Megacorp
  • Stellaris: Distant Stars
  • Stellaris: Apocalypse
  • Stellaris - Path to Destruction bundle
  • Crusader Kings II: Monks and Mystics
  • Stellaris: Leviathans Story Pack
  • Stellaris: Digital Anniversary Edition
  • Stellaris
  • Crusader Kings II: Conclave
  • Crusader Kings II: Horse Lords
  • Pillars of Eternity
  • Crusader Kings II: Way of Life
  • Magicka: Wizard Wars Founder Wizard
  • Europa Universalis IV: Pre-order
  • Stellaris: Synthetic Dawn
  • Europa Universalis IV: Call to arms event
You won't need that many, though, so if you like, you could collect maybe 100 (shot from the hip). I'd test it myself if I wasn't very confident the AI doesn't cheat on dice rolls, even lucky AIs.

I did. The p-value is .05692, which means the result in this case is actually almost significant enough to reject the null hypothesis (the dice is fair). I also agreed he needs a bigger sample size, but the result is actually quite close to rejecting the null hypothesis already.

There is no such thing as "almost" significant, since significance is a completely arbitrary distinction. The p-value 0.57 means that there is a 5.7% chance of observing a difference as great or greater than the one we observed, assuming various assumptions are met. P-values do not provide information about the appropriateness of your sample size, the confidence interval, or better yet, power analysis, does that. Since the 95% CI is fairly large, he needs a larger sample size.

If you're tangentially interested in this stuff, a great video about dispelling p-value worship is Geoff Cummings' Dance of the p-Values.
 
Last edited:
Status
Not open for further replies.