Posts

Showing posts with the label statistics

 Lanchester's laws and Risk

Image
  Credit: Colony of Gamers/Flickr   My family settled down to a perfectly civil game of Risk this Christmas.  At one stage my wife, who controlled most of Asia, challenged my total control of Australia by attacking my territory of Indonesia from her territory of South East Asia, with about 100 armies. Attacks in Risk consist of a series of "battles".  In the initial battles two armies are always lost: either two attackers, two defenders, or one of each.  After enough battles either one defending army remains or two attackers.  From this point on only one army is lost per battle.  Eventually either the defender is completely obliterated or the attacker reduced to one army (which is needed to defend the originating territory) and the attack is over. In the initial battles (when the attacker has at least 3 armies remaining - not including one set aside to defend the originating territory - and the defender at least 2) the attacker rolls 3 red dice and the defender 2 blue dice. 

Principal Component Analysis - A Geometric Approach

Image
Overview Principal Component Analysis is a neat statistical trick, with a simple bit of linear algebra backing it up.  Imagine you've got a dependent, or response variable, $Y$ and a large number of independent, a.k.a. explanatory, variables $X_1, ... X_p$.  You also have $n$ measurements of each, giving you a matrix $$ \begin{align} X = & \begin{pmatrix} x_{11} & x_{12} & ... & x_{1n}\\ \vdots & & & \\ x_{p1} & x_{p2} & ... & x_{pn}\\ \end{pmatrix} \\ = & \begin{pmatrix} -\mathbb{x_1}- \\ \vdots \\ -\mathbb{x_p}- \\ \end{pmatrix} \\ \end{align} $$ You want to build a model explaining how $Y$ depends on the $X_i$, perhaps a linear model like $$ Y = \beta_0 + \sum_{i=1}^p \beta_i X_i $$ but first you need to check that the $X_i$ are more or less independent of each other, otherwise there's no way of uniquely setting the $\beta_i$ values and the stats package is likely to produce an unreliable output.  In general the $X_i$ are not inde