Student ID: F74082125
Student Name: 張議隆
More information in hackmd website
Most commands are already written in Makefile
To set the RNG seed, run make setup
or make
in short.
This command may not always work(at least in my enviorment). If make setup
did not set the RNG seed, run export GSL_RNG_SEED=74082125
manually to set the seed.
Then you could run make run_seperate
and run_combine
to get the simulation result.
If the simulation took too long to generate the result, modify line 23 to a smaller number.
Table entry taken directly from given pdf file
s | 0 | 1 | 2 | 3 | 4 |
---|---|---|---|---|---|
1 | |||||
Extended from the table above, and re-calculate
s | 0 | 1 | 2 | 3 | 4 | 5 |
---|---|---|---|---|---|---|
1 | ||||||
1 | 2 | 3 | 4 | ||
---|---|---|---|---|---|
1 | |||||
2 | |||||
3 | |||||
4 | |||||
5 |
the below comes from above table
1 | 2 | 3 | 4 | ||
---|---|---|---|---|---|
1 | |||||
2 | |||||
3 | |||||
4 | |||||
5 |
total sample points: 32768000
Using default random seed
0 2203936 1223708 1050776 1051424 1224938 2206024
1 1257968 701588 599610 601165 699895 1259920
2 1136410 630719 540751 539500 630802 1133816
3 1259445 699621 600675 600773 699740 1259132
4 2204491 1223057 1050313 1050340 1224293 2203170
s | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
---|---|---|---|---|---|---|---|---|---|---|
1 | ||||||||||
Combination table are calculated using python code
s | combinations() | ratio | probability |
---|---|---|---|
0 | |||
1 | |||
2 | |||
3 | |||
4 | |||
5 | |||
6 | |||
7 | |||
8 | |||
9 |
The following table was generated using the code below, some part was from modified version of code above.
1 | 2 | 3 | 4 | 5 | ||
---|---|---|---|---|---|---|
48620.0 | 14300.0 | 5362.5 | 2042.86 | 700.0 | 140.0 | |
1 | 11440.0 | 10725.0 | 8171.43 | 5600.0 | 2800.0 | 817.14 |
2 | 3217.5 | 6128.57 | 8400.0 | 8400.0 | 6128.57 | 3217.5 |
3 | 817.14 | 2800.0 | 5600.0 | 8171.43 | 10725.0 | 11440.0 |
4 | 140.0 | 700.0 | 2042.86 | 5362.5 | 14300.0 | 48620.0 |
This could take a while…
total sample points: 262144000
Using default random seed
0 48622130 14298062 5716439 2200221 698170 139973
1 11438522 11441474 8802979 5596545 2799594 880475
2 3430081 6598164 8400003 8403540 6604028 3428588
3 879872 2800758 5600501 8800023 11443106 11438750
4 140201 701729 2203215 5719598 14292911 48624348
1112_courses
probability models