• Crusader Kings III Available Now!

    The realm rejoices as Paradox Interactive announces the launch of Crusader Kings III, the latest entry in the publisher’s grand strategy role-playing game franchise. Advisors may now jockey for positions of influence and adversaries should save their schemes for another day, because on this day Crusader Kings III can be purchased on Steam, the Paradox Store, and other major online retailers.


    Real Strategy Requires Cunning

lila-laune-bär

Captain
47 Badges
Feb 14, 2005
416
10
  • Age of Wonders III
  • Hearts of Iron IV: Cadet
  • Tyranny: Archon Edition
  • Stellaris: Leviathans Story Pack
  • Cities: Skylines - Natural Disasters
  • Hearts of Iron IV: Together for Victory
  • Stellaris - Path to Destruction bundle
  • Cities: Skylines - Mass Transit
  • Knights of Honor
  • Surviving Mars
  • Hearts of Iron IV: Death or Dishonor
  • Stellaris: Synthetic Dawn
  • Stellaris Sign-up
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Apocalypse
  • Cities: Skylines - Parklife Pre-Order
  • Cities: Skylines - Parklife
  • Stellaris: Distant Stars
  • Shadowrun Returns
  • Shadowrun: Dragonfall
  • Shadowrun: Hong Kong
  • Cities: Skylines Industries
  • Hearts of Iron IV: Expansion Pass
  • Prison Architect
  • Victoria 2
  • Crusader Kings II
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sword of Islam
  • Commander: Conquest of the Americas
  • Europa Universalis III
  • Hearts of Iron III
  • Magicka
  • Rome Gold
  • Sword of the Stars II
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • Rome: Vae Victis
  • 500k Club
  • Cities: Skylines
  • Crusader Kings II: Horse Lords
  • Cities: Skylines - After Dark
  • Knights of Pen and Paper 2
  • Cities: Skylines - Snowfall
  • Stellaris
I think the new system of "mean time to happen" is a very interesting concept. So I'm interested in how it works exactly. As I understand it, it's basically a concept of probability, and MTTH is the expected time time wait for an event to fire. Speaking of probabilty, we name it "mean".

That's nice and all, but that's only half the information. It's even more important what type of probabilty distribution we've got and what's the statistical dispersion. Is there any more information about the system available? If not, one could run write an event, which should fire very often, note when it fires and thus estimate the dispersion, which would be quite handy for modders, I believe.

My first guess would be that the game uses a normal distribution.


Your thoughts, ideas, comments?
 
Last edited:
  • 1Like
Reactions:

Zakath

General
133 Badges
Oct 31, 2000
2.138
590
  • Hearts of Iron II: Armageddon
  • Crusader Kings II
  • Crusader Kings II: Charlemagne
  • 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
  • Stellaris: Leviathans Story Pack
  • Europa Universalis IV: Common Sense
  • Stellaris: Digital Anniversary Edition
  • Crusader Kings II: Reapers Due
  • Hearts of Iron IV: Field Marshal
  • Victoria 2
  • Hearts of Iron IV: Colonel
  • Hearts of Iron IV: Cadet
  • Stellaris Sign-up
  • Hearts of Iron IV Sign-up
  • Stellaris: Galaxy Edition
  • War of the Roses
  • 200k Club
  • Crusader Kings II: Conclave
  • Europa Universalis III: Collection
  • Crusader Kings II: Horse Lords
  • Europa Universalis: Rome Collectors Edition
  • Mount & Blade: Warband
  • Mount & Blade: With Fire and Sword
  • Crusader Kings II: Way of Life
  • Stellaris: Apocalypse
  • Deus Vult
  • Crusader Kings III
  • Shadowrun Returns
  • Europa Universalis IV: Dharma
  • Stellaris: Distant Stars
  • Cities: Skylines - Parklife
  • BATTLETECH - Backer
  • BATTLETECH - Beta Backer
  • Europa Universalis IV: Rule Britannia
  • Cities: Skylines - Natural Disasters
  • Cities: Skylines - Green Cities
  • Hearts of Iron IV: Death or Dishonor
  • Surviving Mars
  • BATTLETECH
  • PDXCON 2017 Gold Ticket holder
  • Steel Division: Normandy 44 Deluxe Edition
  • Europa Universalis IV: Mandate of Heaven
  • Cities: Skylines - Mass Transit
I believe MTTH is a lot simpler than that. Basically if MTTH = 300, then there's 1/300'th chance of it happening each month.

Can't give you a quote for this, but I think I saw it in the wiki somewhere.
 

esbenmf

Eltit Motsuc
69 Badges
Sep 28, 2004
766
245
  • Crusader Kings II: Horse Lords
  • 200k Club
  • 500k Club
  • Cities: Skylines
  • Cities: Skylines Deluxe Edition
  • Crusader Kings II: Holy Knight (pre-order)
  • Europa Universalis III: Collection
  • Europa Universalis IV: El Dorado
  • Europa Universalis IV: Pre-order
  • Europa Universalis: Rome Collectors Edition
  • Mount & Blade: With Fire and Sword
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: Common Sense
  • Warlock: Master of the Arcane
  • Cities: Skylines - After Dark
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Conclave
  • Cities: Skylines - Snowfall
  • Europa Universalis IV: Mare Nostrum
  • Stellaris Sign-up
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Rights of Man
  • Cities: Skylines - Natural Disasters
  • Crusader Kings II: Monks and Mystics
  • Cities: Skylines - Mass Transit
  • Crusader Kings III
  • Europa Universalis IV: Art of War
  • Crusader Kings II
  • Crusader Kings II: Charlemagne
  • 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
  • Deus Vult
  • Europa Universalis III
  • Divine Wind
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Call to arms event
  • Heir to the Throne
  • Europa Universalis III Complete
  • King Arthur II
  • Leviathan: Warships
  • Magicka
  • Europa Universalis III Complete
  • Europa Universalis IV: Res Publica
1/MTTH is the probability of said event happening each month independently of other months. We are thus working with an exponential distribution with parameter MTTH.

Esben
 
  • 1Like
Reactions:

lila-laune-bär

Captain
47 Badges
Feb 14, 2005
416
10
  • Age of Wonders III
  • Hearts of Iron IV: Cadet
  • Tyranny: Archon Edition
  • Stellaris: Leviathans Story Pack
  • Cities: Skylines - Natural Disasters
  • Hearts of Iron IV: Together for Victory
  • Stellaris - Path to Destruction bundle
  • Cities: Skylines - Mass Transit
  • Knights of Honor
  • Surviving Mars
  • Hearts of Iron IV: Death or Dishonor
  • Stellaris: Synthetic Dawn
  • Stellaris Sign-up
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Apocalypse
  • Cities: Skylines - Parklife Pre-Order
  • Cities: Skylines - Parklife
  • Stellaris: Distant Stars
  • Shadowrun Returns
  • Shadowrun: Dragonfall
  • Shadowrun: Hong Kong
  • Cities: Skylines Industries
  • Hearts of Iron IV: Expansion Pass
  • Prison Architect
  • Victoria 2
  • Crusader Kings II
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sword of Islam
  • Commander: Conquest of the Americas
  • Europa Universalis III
  • Hearts of Iron III
  • Magicka
  • Rome Gold
  • Sword of the Stars II
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • Rome: Vae Victis
  • 500k Club
  • Cities: Skylines
  • Crusader Kings II: Horse Lords
  • Cities: Skylines - After Dark
  • Knights of Pen and Paper 2
  • Cities: Skylines - Snowfall
  • Stellaris
Zakath said:
I believe MTTH is a lot simpler than that. Basically if MTTH = 300, then there's 1/300'th chance of it happening each month.

Can't give you a quote for this, but I think I saw it in the wiki somewhere.
esbenmf said:
1/MTTH is the probability of said event happening each month independently of other months. We are thus working with an exponential distribution with parameter MTTH.

Esben
It's as simple as that? Gosh, I thought paradox would have used a more elaborated model.

So thanks, case closed. :D

edit: But that's no exponential distribution, but a geometric distribution, if I'm not mistaken.
http://en.wikipedia.org/wiki/Geometric_distribution
 

esbenmf

Eltit Motsuc
69 Badges
Sep 28, 2004
766
245
  • Crusader Kings II: Horse Lords
  • 200k Club
  • 500k Club
  • Cities: Skylines
  • Cities: Skylines Deluxe Edition
  • Crusader Kings II: Holy Knight (pre-order)
  • Europa Universalis III: Collection
  • Europa Universalis IV: El Dorado
  • Europa Universalis IV: Pre-order
  • Europa Universalis: Rome Collectors Edition
  • Mount & Blade: With Fire and Sword
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: Common Sense
  • Warlock: Master of the Arcane
  • Cities: Skylines - After Dark
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Conclave
  • Cities: Skylines - Snowfall
  • Europa Universalis IV: Mare Nostrum
  • Stellaris Sign-up
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Rights of Man
  • Cities: Skylines - Natural Disasters
  • Crusader Kings II: Monks and Mystics
  • Cities: Skylines - Mass Transit
  • Crusader Kings III
  • Europa Universalis IV: Art of War
  • Crusader Kings II
  • Crusader Kings II: Charlemagne
  • 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
  • Deus Vult
  • Europa Universalis III
  • Divine Wind
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Call to arms event
  • Heir to the Throne
  • Europa Universalis III Complete
  • King Arthur II
  • Leviathan: Warships
  • Magicka
  • Europa Universalis III Complete
  • Europa Universalis IV: Res Publica
It is the descrete version of an exponential distribution, yes.

Esben
 

Hakkapeliitta

∇X(ω)
66 Badges
Sep 3, 2000
807
0
  • Europa Universalis: Rome
  • Hearts of Iron III
  • Hearts of Iron III: Their Finest Hour
  • Heir to the Throne
  • Europa Universalis III Complete
  • March of the Eagles
  • Europa Universalis III Complete
  • Europa Universalis IV: Res Publica
  • Victoria: Revolutions
  • Crusader Kings II: Charlemagne
  • Semper Fi
  • Sengoku
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • Rome: Vae Victis
  • Europa Universalis IV: Third Rome
  • Europa Universalis IV: Pre-order
  • Europa Universalis IV: Mare Nostrum
  • Europa Universalis IV: Call to arms event
  • Crusader Kings II
  • 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
  • For the Motherland
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Deus Vult
  • East India Company Collection
  • Europa Universalis III
  • Divine Wind
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Crusader Kings II: Reapers Due
  • Hearts of Iron IV: Colonel
  • Hearts of Iron IV: Cadet
  • Europa Universalis IV: Rights of Man
  • Hearts of Iron IV: Expansion Pass
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Way of Life
  • Mount & Blade: With Fire and Sword
  • Mount & Blade: Warband
  • Europa Universalis III: Collection
  • Crusader Kings II: Holy Knight (pre-order)
  • 500k Club
Zakath said:
I believe MTTH is a lot simpler than that. Basically if MTTH = 300, then there's 1/300'th chance of it happening each month.

Can't give you a quote for this, but I think I saw it in the wiki somewhere.
I remember seeing the same. Thus the MTTH value of k time units maps one-to-one to the fixed probability per time unit p that has the property that

expected number of the event triggering = 1 for k time units...

[my probability math is a bit rusty but i AFAIK it's basicly a poisson process
with the intensity of p*t. Which would mean that more generally the probablity of the event triggering exactly k times in a time of t would be

P(# of triggering = k) = exp(-p*t)*((p*t)^k/k!)

]
 

Johan

Studio Manager Paradox Tinto
Administrator
Super Moderator
Moderator
16 Badges
Dec 14, 1999
18.079
28.872
  • Diplomacy
  • Teleglitch: Die More Edition
  • War of the Roses
  • 500k Club
  • Crusader Kings II: Holy Knight (pre-order)
  • Europa Universalis III: Collection
  • Magicka: Wizard Wars Founder Wizard
  • Hearts of Iron IV Sign-up
  • Stellaris Sign-up
  • Imperator: Rome Sign Up
  • A Game of Dwarves
  • Lead and Gold
  • Magicka
  • Starvoid
MeanTimeToHappen = the value given after modifiers..
noOfDays = basically, how many days are between checks.. (currently 1)

Code:
		float daylyChance = float(1.0f - exp( log(0.5f) / MeanTimeToHappen ));
		float chance = float(1 - exp( noOfDays * log(1 - daylyChance)) );
		return chance;  //0-1% chance of event happening that day
 

Hive

Lex Superior
19 Badges
Oct 16, 2002
12.250
15
  • Heir to the Throne
  • Europa Universalis IV: Pre-order
  • 500k Club
  • Victoria 2: Heart of Darkness
  • Victoria 2: A House Divided
  • Victoria 2
  • Europa Universalis IV: Res Publica
  • Europa Universalis III Complete
  • March of the Eagles
  • Europa Universalis III Complete
  • Hearts of Iron Anthology
  • Europa Universalis IV: Call to arms event
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Divine Wind
  • Europa Universalis III Complete
  • Europa Universalis III
  • Crusader Kings II
Johan said:
noOfDays = basically, how many days are between checks.. (currently 1)
Is this hardcoded, or can it be defined in an event? Would be useful to have the game check for triggers in certain events with intervals. I assume it would also help on game performance if it doesn't have to check all events every day.
 

Darkrenown

Star marshal
28 Badges
Jan 8, 2002
24.642
16.661
no
  • Sengoku
  • Crusader Kings II: Reapers Due
  • Stellaris Sign-up
  • Paradox Order
  • Victoria 2 Beta
  • Victoria 2 A House Divided Beta
  • Europa Universalis: Rome Collectors Edition
  • Hearts of Iron II: Beta
  • Cities: Skylines
  • 500k Club
  • 200k Club
  • Rome: Vae Victis
  • Victoria 2
  • Ship Simulator Extremes
  • Hearts of Iron II: Armageddon
  • Semper Fi
  • Europa Universalis: Rome
  • Europa Universalis III Complete
  • Lost Empire - Immortals
  • Europa Universalis III Complete
  • Heir to the Throne
  • Hearts of Iron III Collection
  • Hearts of Iron III
  • For The Glory
  • Europa Universalis III: Chronicles
  • Europa Universalis III
  • East India Company
  • Deus Vult
That's source code (C++ maybe) in the box, so it's hardcoded :)
 

Hive

Lex Superior
19 Badges
Oct 16, 2002
12.250
15
  • Heir to the Throne
  • Europa Universalis IV: Pre-order
  • 500k Club
  • Victoria 2: Heart of Darkness
  • Victoria 2: A House Divided
  • Victoria 2
  • Europa Universalis IV: Res Publica
  • Europa Universalis III Complete
  • March of the Eagles
  • Europa Universalis III Complete
  • Hearts of Iron Anthology
  • Europa Universalis IV: Call to arms event
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Divine Wind
  • Europa Universalis III Complete
  • Europa Universalis III
  • Crusader Kings II
Darkrenown said:
That's source code (C++ maybe) in the box, so it's hardcoded :)
Yeah I'm aware that the content Johan posted is from the code, but perhaps there was some sort of equalent to the EU2 'offset'.
 

Hakkapeliitta

∇X(ω)
66 Badges
Sep 3, 2000
807
0
  • Europa Universalis: Rome
  • Hearts of Iron III
  • Hearts of Iron III: Their Finest Hour
  • Heir to the Throne
  • Europa Universalis III Complete
  • March of the Eagles
  • Europa Universalis III Complete
  • Europa Universalis IV: Res Publica
  • Victoria: Revolutions
  • Crusader Kings II: Charlemagne
  • Semper Fi
  • Sengoku
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • Rome: Vae Victis
  • Europa Universalis IV: Third Rome
  • Europa Universalis IV: Pre-order
  • Europa Universalis IV: Mare Nostrum
  • Europa Universalis IV: Call to arms event
  • Crusader Kings II
  • 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
  • For the Motherland
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Deus Vult
  • East India Company Collection
  • Europa Universalis III
  • Divine Wind
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Crusader Kings II: Reapers Due
  • Hearts of Iron IV: Colonel
  • Hearts of Iron IV: Cadet
  • Europa Universalis IV: Rights of Man
  • Hearts of Iron IV: Expansion Pass
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Way of Life
  • Mount & Blade: With Fire and Sword
  • Mount & Blade: Warband
  • Europa Universalis III: Collection
  • Crusader Kings II: Holy Knight (pre-order)
  • 500k Club
Johan said:
MeanTimeToHappen = the value given after modifiers..
noOfDays = basically, how many days are between checks.. (currently 1)

Code:
		float daylyChance = float(1.0f - exp( log(0.5f) / MeanTimeToHappen ));
		float chance = float(1 - exp( noOfDays * log(1 - daylyChance)) );
		return chance;  //0-1% chance of event happening that day
Thank you Johan (God of Thunder etc.)!

So it isn't simple 1/MTTH chance per time unit after all.

The above definition leads to probability p (chance_per_day) that, when checked for a time period of MTTH will result in a 0.5 (=50%) chance of the event firing at least once. So currently the wiki is wrong on this.

Let's have a concrete example: an event with a modified MTTH of 3 months. 3 months = 90 days. Log is the natural logarithm in C++.

chance per day p:
Code:
P =1-exp(log(0.5)/90)
         =1-exp(log(0.5))^(1/90)
         =1-(0.5)^(1/90)
i.e. aproximately p=0.007672053737056518974464631174 chance per day.

Since currently noOfDays=1 then chance per check is the same as daily chance.

With the above daily chance p the following holds:

1) The expected value for the number of times that the event triggers during 3 months is not 1 (as it would be if the wiki was right), but 90*p, i.e. aproximately 0.69.

2) The amount of days k that one has to wait for the event to have had a 50-50 chance of triggering (at least once) is 90 days (i.e. exactly the MTTH):

Code:
(1-p)^k=0.5
k*log(1-p) = log(0.5)
k=log(0.5)/log(1-p)
k=90
 
Last edited:

dharper

Dei Gratia author
81 Badges
Aug 7, 2002
20.705
2.370
  • Victoria 2: Heart of Darkness
  • Majesty 2
  • March of the Eagles
  • Europa Universalis III Complete
  • Europa Universalis IV: Res Publica
  • Victoria: Revolutions
  • Europa Universalis: Rome
  • Rome Gold
  • Semper Fi
  • Sengoku
  • Supreme Ruler 2020
  • Victoria 2
  • Victoria 2: A House Divided
  • Knights of Pen and Paper +1 Edition
  • Rome: Vae Victis
  • 500k Club
  • Cities: Skylines
  • Europa Universalis III: Collection
  • Europa Universalis IV: El Dorado
  • Europa Universalis IV: Pre-order
  • Pride of Nations
  • Crusader Kings II: Way of Life
  • Pillars of Eternity
  • Humble Paradox Bundle
  • Europa Universalis IV: Common Sense
  • Stellaris: Ancient Relics
  • Divine Wind
  • Cities in Motion
  • Crusader Kings II
  • Crusader Kings II: Charlemagne
  • 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
  • Europa Universalis III Complete
  • Arsenal of Democracy
  • 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 Glory
  • For the Motherland
  • Hearts of Iron III
  • Heir to the Throne
  • Impire
<saves this thread immediately>

I have been hoping for some time that a Paradox staffer would post the math behind the MTTH. :) Thank you for this thread!
 

unmerged(47003)

Captain
Jul 31, 2005
396
0
Damn you. Making me dust off my calculator! It's been years since I've done any math.

The code may as well be Gree... well Swedish to me, so thank you for the little writeup Hakkapeliitta.

It looks as though that .69 probability of the event occurring once in the MTTH is constant--it doesn't matter what the MTTH is, it will always be .69. (I know there's probably a simple way to do this algebraically, but hooray for arithmetic trial and error!)

Then for the chance for the event to occur exactly once, it would just be 1/0.69=1.45.

So the wiki could just be changed to saying "The event will probably occur once by 1.45*MTTH." (As well, of course, as the code itself.)

This 1.45*MTTH is the value I suspect most players will care about.

This goes a fair bit to explaining why I only had 2 of my 5 possible Yemeni great men fire, despite the fact that they were all in office for 25+ years. (Great Men MTTH = 25 years) They would have to be in office for 36.25 years to probably fire. (And the MTTH was actually a bit higher than 25 years, since I had a couple of *1.1 penalties for narrowminded and the like.)

...

Isn't there a way to tell when an event has a 95% likelihood that it will fire within a certain period? Something with standard deviations or something like that.

So you could say "an event will fire probably once in 1.45*MTTH, but by x*MTTH, there is a 95% chance that the event will have fired." Then you could set hard end dates on when events will fire by and rely upon those in a game or mod.
 

Hakkapeliitta

∇X(ω)
66 Badges
Sep 3, 2000
807
0
  • Europa Universalis: Rome
  • Hearts of Iron III
  • Hearts of Iron III: Their Finest Hour
  • Heir to the Throne
  • Europa Universalis III Complete
  • March of the Eagles
  • Europa Universalis III Complete
  • Europa Universalis IV: Res Publica
  • Victoria: Revolutions
  • Crusader Kings II: Charlemagne
  • Semper Fi
  • Sengoku
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • Rome: Vae Victis
  • Europa Universalis IV: Third Rome
  • Europa Universalis IV: Pre-order
  • Europa Universalis IV: Mare Nostrum
  • Europa Universalis IV: Call to arms event
  • Crusader Kings II
  • 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
  • For the Motherland
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Deus Vult
  • East India Company Collection
  • Europa Universalis III
  • Divine Wind
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Crusader Kings II: Reapers Due
  • Hearts of Iron IV: Colonel
  • Hearts of Iron IV: Cadet
  • Europa Universalis IV: Rights of Man
  • Hearts of Iron IV: Expansion Pass
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Way of Life
  • Mount & Blade: With Fire and Sword
  • Mount & Blade: Warband
  • Europa Universalis III: Collection
  • Crusader Kings II: Holy Knight (pre-order)
  • 500k Club
Primus Inter Pa said:
Damn you. Making me dust off my calculator! It's been years since I've done any math.

The code may as well be Gree... well Swedish to me, so thank you for the little writeup Hakkapeliitta.

It looks as though that .69 probability of the event occurring once in the MTTH is constant--it doesn't matter what the MTTH is, it will always be .69. (I know there's probably a simple way to do this algebraically, but hooray for arithmetic trial and error!)
The expected number of the event triggering during a time period of MTTH length is

Code:
MTTH*(1-(0.5)^(1/MTTH))
which is not a constant (easy example MTTH=1 day), but in practical cases usually hangs around 0.69. One needs to bear in mind that it isn't the "chance of event happening once" but the expected value, i.e. if you tried it out 1000 times, and counted how many times the event triggered during the MTTH it would sometimes not trigger at all, sometimes many times, but the mean "number of event triggering" would be the expected value.

Isn't there a way to tell when an event has a 95% likelihood that it will fire within a certain period? Something with standard deviations or something like that.
Sure. Let's again assume that the checks are made daily. The number of checks needed for the "event having triggered at least once has 95% probability" is the same as for "the event hasn't triggered even once has 5% probability"

Code:
(1-p)^k=0.05
k=log(0.05)/log(1-p)
k=log(0.05)/log(exp(log(0.5)/MTTH))
k=(log(0.05)/log(0.5))*MTTH
log(0.05)/log(0.5) is aproximately 4.32. So the rule of thumb would be that in a period of MTTH*4.32 the event has a 95% chance of firing at least once.
 
Last edited:

unmerged(53922)

Lt. General
Feb 13, 2006
1.243
0
So I understand that chances to event be fired are growing from day to day. What's about game reloading ? Is it enough information in save file, to not start counting from day one ? I am just waiting for Westernization and after 12 years of waiting I saved my game .... I was fulfilled all conditions but after 20 years (240 months) of waiting I still have no luck. Mayby game reloading is my problem ?
 
Last edited:

lenny

Field Marshal
77 Badges
May 4, 2004
2.754
1
  • Mount & Blade: Warband
  • Europa Universalis: Rome
  • Rome Gold
  • Semper Fi
  • Sengoku
  • Victoria 2
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • Rome: Vae Victis
  • 500k Club
  • Crusader Kings II: Holy Knight (pre-order)
  • Europa Universalis IV: El Dorado
  • Europa Universalis IV: Pre-order
  • Europa Universalis IV: Res Publica
  • Crusader Kings II: Way of Life
  • Pillars of Eternity
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Conclave
  • Europa Universalis IV: Mare Nostrum
  • Stellaris
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Stellaris Sign-up
  • Stellaris: Lithoids
  • Europa Universalis IV: Conquest of Paradise
  • Crusader Kings II
  • Crusader Kings II: Charlemagne
  • 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: Sword of Islam
  • Europa Universalis III
  • Divine Wind
  • Europa Universalis IV: Art of War
  • Hearts of Iron II: Armageddon
  • 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
  • Hearts of Iron III Collection
  • Heir to the Throne
  • Europa Universalis III Complete
  • Majesty 2
  • Majesty 2 Collection
Kristof73 said:
So I understand that chances to event be fired are growing from day to day. What's about game reloading ? Is it enough information in save file, to not start counting from day one ? I am just waiting for Westernization and after 12 years of waiting I saved my game .... I was fulfilled all conditions but after 20 years (240 months) of waiting I still have no luck. Mayby game reloading is my problem ?
Given that the modifiers to MTTH do not change, the daily chance of an event firing remains constant over time. No information has to be saved what so ever, and saving/reloading does not change your "luck".
 

unmerged(53922)

Lt. General
Feb 13, 2006
1.243
0
lenny said:
Given that the modifiers to MTTH do not change, the daily chance of an event firing remains constant over time. No information has to be saved what so ever, and saving/reloading does not change your "luck".
So with huge luck any event could fire after even one day of waiting or teoretically never ....
 

TeeWee

Captain
21 Badges
May 27, 2004
373
15
  • 500k Club
  • Prison Architect
  • Crusader Kings II: Holy Fury
  • Europa Universalis IV: Mandate of Heaven
  • Europa Universalis IV: Rights of Man
  • Crusader Kings II: Reapers Due
  • Crusader Kings II: Conclave
  • Europa Universalis IV: Cossacks
  • Europa Universalis IV: Common Sense
  • Pillars of Eternity
  • Crusader Kings II: Way of Life
  • Crusader Kings II
  • Europa Universalis IV: Res Publica
  • For The Glory
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Art of War
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: The Republic
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Legacy of Rome
Kristof73 said:
So I understand that chances to event be fired are growing from day to day. What's about game reloading ? Is it enough information in save file, to not start counting from day one ? I am just waiting for Westernization and after 12 years of waiting I saved my game .... I was fulfilled all conditions but after 20 years (240 months) of waiting I still have no luck. Mayby game reloading is my problem ?
The checks are independent of each other. That is, the succes chance of the next check is not influenced by previous checks. There is no "memory" of the previous checks.

Concrete example: if you flip a coin, there's a 50-50 chance it will land heads. Just because the previous 10 flips were tails, doesn't mean that the chance of heads for the next flip will be greater than 50-50.

Example of dependent check:
A vase containing ten red marbles and one black marble. If you pulled out ten marbles and they all turn out to be red, and you don't put the red marbles back into the vase, there will be a 100% chance that the next marble will be black.

In short; no, reloading is not your problem :)