NATION

PASSWORD

How to calculate standard deviation for corruption?

Bug reports, general help, ideas for improvements, and questions about how things are meant to work.
User avatar
PillarOfSociety
Political Columnist
 
Posts: 4
Founded: Mar 28, 2019
Ex-Nation

How to calculate standard deviation for corruption?

Postby PillarOfSociety » Thu Apr 04, 2019 11:00 am

I want to calculate Z-score for various trends, including corruption (and I want to do it, because I want to add Z-scores for different stats and call the result something like "Rule of the law scoring"). But I need the standard deviation of population (by population I mean set of all NS countries) in order to calculate it. I wonder how can it be calculated manually.
Last edited by PillarOfSociety on Thu Apr 04, 2019 11:04 am, edited 2 times in total.

User avatar
Nullarni
Ambassador
 
Posts: 1348
Founded: Sep 26, 2006
Ex-Nation

Postby Nullarni » Thu Apr 04, 2019 5:50 pm

I actually did a statistical analysis of WA member states and how their various scores differed from the general NS population for a political research methods class. This was years ago, but if I remember correctly if you can figure out a way to get a true random sampling, you only need to sample about 100 or so nations to draw pretty reliable conclusions. That sounds like a quick afternoon project to me.

EDIT: I did a quick search through my files, and I found that I got my data through an API request. Its been a while since I looked, but I think NS used to do a daily data dump that gives the stats on all nations in the game. If you have a few minutes in Excel, you could probably calculate out the stats you want.

SECOND EDIT: Check out this thread for details on how to do API requests. All the data you could ever want is at your fingertips.

THIRD EDIT: Alright, I found the link to the daily data dump for nations. Just go here - https://www.nationstates.net/pages/nations.xml.gz
It should be a file ~30 MB in size and it could be up to 24 hours old, but it should have all the information you need.

FOURTH EDIT: Here's the formula for standard deviation.
Image
...Though I am pretty sure Excel can do all that for you.
Last edited by Nullarni on Thu Apr 04, 2019 6:34 pm, edited 6 times in total.
Proud founder of the NEW WARSAW PACT. Visitors welcome.

User avatar
Trotterdam
Postmaster-General
 
Posts: 10545
Founded: Jan 12, 2012
Left-Leaning College State

Postby Trotterdam » Thu Apr 04, 2019 8:16 pm

Here's the means and standard deviations drawn from all nations in my database (note, this only includes non-WA nations that are actively answering issues):
Civil Rights|49.3881205660306|22.9713305776987
Economy|67.6790636974087|27.8907679080417
Political Freedom|48.3872168898664|27.7389596585844
Wealth Gaps|10.4531567965399|50.2878236313489
Death Rate|88.1525850753061|83.1175309632212
Compassion|39.3108494252456|19.6262456030651
Eco-Friendliness|1558.88593231935|2949.62334973483
Social Conservatism|54.3867138358816|21.2990164780158
Nudity|159.258564437194|215.982133379039
Industry: Automobile Manufacturing|2048.573269851|3409.31328963062
Industry: Cheese Exports|2128.19514435296|2352.81276350805
Industry: Basket Weaving|2549.41630866121|2713.18061688185
Industry: Information Technology|8608.20899085703|13676.5940940754
Industry: Pizza Delivery|1824.87522440154|2513.83347884625
Industry: Trout Fishing|2835.87436852689|4114.13903136762
Industry: Arms Manufacturing|7258.43504874986|12241.4062613505
Sector: Agriculture|2408.02192268305|3372.84177965668
Industry: Beverage Sales|1699.69836640241|3589.81658158489
Industry: Timber Woodchipping|2436.74380173762|3799.08415410879
Industry: Mining|3124.6539944612|5192.64832320524
Industry: Insurance|1955.97224894723|2811.32810880979
Industry: Furniture Restoration|2374.25761827089|2938.95626110007
Industry: Retail|3946.35288212761|6567.54238795226
Industry: Book Publishing|4035.69982321033|6290.23901699443
Industry: Gambling|2326.22185136007|4418.91456515437
Sector: Manufacturing|11864.1113555142|14744.4096921759
Government Size|17.5238199476459|10.7192451151111
Welfare|1623.20479342926|2139.59605211295
Public Healthcare|2160.82382070642|2453.39893343102
Law Enforcement|2595.66613452717|3118.44521179634
Business Subsidization|2222.83711976945|2963.6669419266
Religiousness|857.873709928278|3015.48100437023
Income Equality|36.9584843886337|25.4108156083672
Niceness|12.7809533745592|13.9440809116622
Rudeness|59.067068553435|62.8148681190611
Intelligence|39.727128495011|39.0837059200579
Ignorance|12.0817701733753|16.6027245550381
Political Apathy|48.2656902765696|10.86957576949
Health|4.82671762965208|6.19134960570195
Cheerfulness|49.1064452369155|8.92116272070005
Weather|81.9298531810767|298.248760859799
Compliance|67.9271740202587|23.107326674558
Safety|75.4403725482755|37.8656094360511
Lifespan|62.190074737281|14.2434439382422
Ideological Radicality|19.7272434462613|9.42611111871932
Defense Forces|3679.62460601697|6380.29442463686
Pacifism|72.8183637467276|51.8891033215241
Economic Freedom|18.7874005083653|58.9998664684731
Taxation|39.6722045601124|29.4347193729385
Freedom From Taxation|9.6766796919458|256.459212617423
Corruption|34.0899647179315|84.7861839916585
Integrity|85.8433142380206|19.4118385531761
Authoritarianism|1328.56791001177|1782.78934509979
Youth Rebelliousness|-5.24287719564475|30.4318644889471
Culture|75.5688379680565|55.5766752236974
Employment|66.7508418377022|11.4742667470754
Public Transport|1267.60222201145|1574.56918272816
Tourism|739.392613907966|650.94658084521
Weaponization|3.17166280966649|10.4581356453613
Recreational Drug Use|58.4111916233538|32.4869370149612
Obesity|11.5367851587694|9.47396647286369
Secularism|30.9201999317126|27.1148059764261
Environmental Beauty|661.425558632723|718.912899862267
Charmlessness|107.377009370614|339.921357107223
Human Development Index|58.7956747221066|14.2968661686471
Primitiveness|-103.641857809479|201.669475665739
Scientific Advancement|133.022683713348|197.110114396259
Inclusiveness|105.026365567747|64.5448680875691
Average Income|84613.0042505403|68215.4415075813
Average Income of Poor|43121.7806475964|42190.4304565296
Average Income of Rich|187741.536299936|240458.102283016
Public Education|3458.70098448349|4407.18716263745
Crime|6.3355571152168|11.6771145755385
Foreign Aid|461.384499791284|904.619973901934
Average Disposable Income|47214.7873621914|47889.2532160789


Return to Technical

Who is online

Users browsing this forum: Battadia, Flanderlion, Haku, Kractero, Riemstagrad, Shirahime, Socio Polor, Sylh Alanor, Syrandra, The Eternal October, The Ice States

Advertisement

Remove ads