thus spake a.k.tag:www.thusspakeak.com,2013-04-24://1Movable Type 5.2.13On Divisions - studenttag:www.thusspakeak.com,2017:/student//12.2352017-07-21T19:00:00Z2017-07-21T20:19:50Z
The Baron's game most recent game consisted of a series of some six wagers upon the toss of an unfair coin that turned up one side nine times out of twenty and the other eleven times out of twenty at a cost of one fifth part of a coin. Sir R----- was to wager three coins from his purse upon the outcome of each toss, freely divided between heads and tails, and was to return to it twice the value he wagered correctly.
Clearly, our first task in reckoning the fairness of this game is to figure Sir R-----'s optimal strategy for placing his coins. To do this we shall need to know his expected winnings in any given round for any given placement of his coins.
student
The Baron's game most recent game consisted of a series of some six wagers upon the toss of an unfair coin that turned up one side nine times out of twenty and the other eleven times out of twenty at a cost of one fifth part of a coin. Sir R----- was to wager three coins from his purse upon the outcome of each toss, freely divided between heads and tails, and was to return to it twice the value he wagered correctly.
Clearly, our first task in reckoning the fairness of this game is to figure Sir R-----'s optimal strategy for placing his coins. To do this we shall need to know his expected winnings in any given round for any given placement of his coins.
]]>
Annealing Down - a.k.tag:www.thusspakeak.com,2017:/ak//9.2342017-07-07T19:00:00Z2017-07-07T19:11:16Z
A few years ago we saw how we could search for a local minimum of a function, being a point for which it returns a lesser value than any in its immediate vicinity, by taking random steps and rejecting those that lead uphill; an algorithm that we dubbed the blindfolded hill climber. Whilst we have since seen that we could progress towards a minimum much more rapidly by choosing the directions in which to step deterministically, there is a way that we can use random steps to yield better results.
a.k.
A few years ago we saw how we could search for a local minimum of a function, being a point for which it returns a lesser value than any in its immediate vicinity, by taking random steps and rejecting those that lead uphill; an algorithm that we dubbed the blindfolded hill climber. Whilst we have since seen that we could progress towards a minimum much more rapidly by choosing the directions in which to step deterministically, there is a way that we can use random steps to yield better results.
]]>
Further On A Calculus Of Differences - studenttag:www.thusspakeak.com,2017:/student//12.2332017-06-16T19:00:00Z2017-06-16T19:02:42Zstudent
As I have previously reported, my fellow students and I have found our curiosity drawn to the calculus of sequences, in which we define analogues of the derivatives and integrals of functions for a sequence s_{n} with the operators
Δ s_{n} = s_{n} - s_{n-1}
and
n
Δ^{-1}s_{n} =
Σ
s_{i}
i = 1
respectively, where Σ is the summation sign, for which we interpret all non-positively indexed elements as zero.
I have already spoken of the many and several fascinating similarities that we have found between the derivatives of sequences and those of functions and shall now describe those of their integrals, upon which we have spent quite some mental effort these last few months.
]]>
Copulating Normally - a.k.tag:www.thusspakeak.com,2017:/ak//9.2322017-06-02T19:00:00Z2017-06-10T03:44:14Z
Last year we took a look at multivariate uniformly distributed random variables, which generalise uniform random variables to multiple dimensions with random vectors whose elements are independently uniformly distributed. We have now seen how we can similarly generalise normally distributed random variables with the added property that the normally distributed elements of their vectors may be dependent upon each other; specifically that they may be correlated.
As it turns out, we can generalise this dependence to arbitrary sets of random variables with a fairly simple observation.
a.k.
Last year we took a look at multivariate uniformly distributed random variables, which generalise uniform random variables to multiple dimensions with random vectors whose elements are independently uniformly distributed. We have now seen how we can similarly generalise normally distributed random variables with the added property that the normally distributed elements of their vectors may be dependent upon each other; specifically that they may be correlated.
As it turns out, we can generalise this dependence to arbitrary sets of random variables with a fairly simple observation.
]]>
Divisions - baron m.tag:www.thusspakeak.com,2017:/baron_m//11.2302017-05-19T19:00:00Z2017-05-19T19:00:27Zbaron m.
Greetings Sir R-----! I trust that I find you in good spirit? Will you join me in a draught of this rather fine Cognac and perchance some sporting diversion?
Good man!
I propose a game that ever puts me in mind of an adventure of mine in the town of Bağçasaray, where I was posted after General Lacy had driven Khan Fetih Giray out from therein. I had received word that the Khan was anxious to retake the town and been given orders to hold it at all costs.
]]>
The Cumulative Distribution Unction - a.k.tag:www.thusspakeak.com,2017:/ak//9.2292017-05-05T19:00:00Z2017-05-26T23:56:29Za.k.
We have previously seen how we can generalise normally distributed random variables to multiple dimensions by defining vectors with elements that are linear functions of independent standard normally distributed random variables, having means of zero and standard deviations of one, with
Z' = L × Z + μ
where L is a constant matrix, Z is a vector whose elements are the independent standard normally distributed random variables and μ is a constant vector.
So far we have derived and implemented the probability density function and the characteristic function of the multivariate normal distribution that governs such random vectors but have yet to do the same for its cumulative distribution function since it's a rather more difficult task and thus requires a dedicated treatment, which we shall have in this post.
]]>
On Turnabout Is Fair Play - studenttag:www.thusspakeak.com,2017:/student//12.2272017-04-21T19:00:00Z2017-04-21T19:04:40Z
Last time they met, the Baron challenged Sir R----- to turn a square of twenty five coins, all but one of which the Baron had placed heads up, to tails by flipping vertically or horizontally adjacent pairs of heads.
As I explained to the Baron, although I'm not at all sure that he was following me, this is essentially the mutilated chess board puzzle and can be solved by exactly the same argument. Specifically, we need simply imagine that the game were played upon a five by five checker board...
student
Last time they met, the Baron challenged Sir R----- to turn a square of twenty five coins, all but one of which the Baron had placed heads up, to tails by flipping vertically or horizontally adjacent pairs of heads.
As I explained to the Baron, although I'm not at all sure that he was following me, this is essentially the mutilated chess board puzzle and can be solved by exactly the same argument. Specifically, we need simply imagine that the game were played upon a five by five checker board...
]]>
Multiple Multiply Normal Functions - a.k.tag:www.thusspakeak.com,2017:/ak//9.2262017-04-07T19:00:00Z2017-05-26T23:53:27Za.k.
Last time we took a look at how we could define multivariate normally distributed random variables with linear functions of multiple independent standard univariate normal random variables.
Specifically, given a Z whose elements are independent standard univariate normal random variables, a constant vector μ and a constant matrix L
Z' = L × Z + μ
has linearly dependent normally distributed elements, a mean vector of μ and a covariance matrix of
Σ' = L × L^{T}
where L^{T} is the transpose of L in which the rows and columns are switched.
We got as far as deducing the characteristic function and the probability density function of the multivariate normal distribution, leaving its cumulative distribution function and its complement aside until we'd implemented both them and the random variable itself, which we shall do in this post.
]]>
On A Calculus Of Differences - studenttag:www.thusspakeak.com,2017:/student//12.2252017-03-17T19:00:00Z2017-03-17T20:06:04Zstudent
The interest of my fellow students and I has been somewhat piqued of late by a curious similarity of the relationship between sequences and series to that between the derivatives and integrals of functions. Specifically, for a function f taking a non-negative argument x, we have
x
F(x) =
∫
f(x) dx
0
f(x) =
d
F(x)
dx
and for a sequence s having terms
s_{1}, s_{2}, s_{3}, ...
we can define a series S with terms
n
S_{n} = s_{1} + s_{2} + s_{3} + ... + s_{n} =
Σ
s_{i}
i = 1
where Σ is the summation sign, from which we can recover the terms of the sequence with
s_{n} = S_{n} - S_{n-1}
using the convention that S_{0} equals zero.
This similarity rather set us to wondering whether we could employ the language of calculus to reason about sequences and series.
]]>
Every Which Way Is Normal - a.k.tag:www.thusspakeak.com,2017:/ak//9.2242017-03-03T20:00:00Z2017-03-03T20:02:01Z
A few months ago we saw how we could generalise the concept of a random variable to multiple dimensions by generating random vectors rather than numbers. Specifically we took a look at the multivariate uniform distribution which governs random vectors whose elements are independently uniformly distributed.
Whilst it demonstrated that we can find multivariate versions of distribution functions such as the probability density function, the cumulative distribution function and the characteristic function, the uniform distribution is fairly trivial and so, for a more interesting example, this time we shall look at generalising the normal distribution to multiple dimensions.
a.k.
A few months ago we saw how we could generalise the concept of a random variable to multiple dimensions by generating random vectors rather than numbers. Specifically we took a look at the multivariate uniform distribution which governs random vectors whose elements are independently uniformly distributed.
Whilst it demonstrated that we can find multivariate versions of distribution functions such as the probability density function, the cumulative distribution function and the characteristic function, the uniform distribution is fairly trivial and so, for a more interesting example, this time we shall look at generalising the normal distribution to multiple dimensions.
]]>
Turnabout Is Fair Play - baron m.tag:www.thusspakeak.com,2017:/baron_m//11.2232017-02-17T20:00:00Z2017-02-17T20:04:31Z
Why, you look chilled to the bone Sir R-----! Come sit by the hearth and warm yourself whilst I fetch you a medicinal glass of brandy.
To your very good health sir! Will you join me in a wager whilst you recover?
Good show!
I propose a game that I learned upon the banks of the river Styx whilst my fellow travellers and I were waiting for the ferry. This being the third time that I had died, I was quite accustomed to the appalling service quality of the Hadean public transport system and so was most appreciative of a little sport to pass the time.
baron m.
Why, you look chilled to the bone Sir R-----! Come sit by the hearth and warm yourself whilst I fetch you a medicinal glass of brandy.
To your very good health sir! Will you join me in a wager whilst you recover?
Good show!
I propose a game that I learned upon the banks of the river Styx whilst my fellow travellers and I were waiting for the ferry. This being the third time that I had died, I was quite accustomed to the appalling service quality of the Hadean public transport system and so was most appreciative of a little sport to pass the time.
]]>
Integration, Quasi Mode - a.k.tag:www.thusspakeak.com,2017:/ak//9.2222017-02-03T20:00:00Z2017-02-03T20:30:53Z
Last time we saw how it was possible to use uniformly distributed random variables to approximate the integrals of univariate and multivariate functions, being those that take numbers and vectors as arguments respectively. Specifically, since the integral of a univariate function is equal to the net area under its graph within the interval of integration it must equal its average height multiplied by the length of that interval and, by definition, the expected value of that function for a uniformly distributed random variable on that interval is the average height and can be approximated by the average of a large number of samples of it. This is trivially generalised to multivariate functions with multidimensional volumes instead of areas and lengths.
We have also seen how quasi random sequences fill areas more evenly than pseudo random sequences and so you might be asking yourself whether we could do better by using the former rather than the latter to approximate integrals.
Clever you!
a.k.
Last time we saw how it was possible to use uniformly distributed random variables to approximate the integrals of univariate and multivariate functions, being those that take numbers and vectors as arguments respectively. Specifically, since the integral of a univariate function is equal to the net area under its graph within the interval of integration it must equal its average height multiplied by the length of that interval and, by definition, the expected value of that function for a uniformly distributed random variable on that interval is the average height and can be approximated by the average of a large number of samples of it. This is trivially generalised to multivariate functions with multidimensional volumes instead of areas and lengths.
We have also seen how quasi random sequences fill areas more evenly than pseudo random sequences and so you might be asking yourself whether we could do better by using the former rather than the latter to approximate integrals.
Clever you!
]]>
On One Against Many - studenttag:www.thusspakeak.com,2017:/student//12.2212017-01-20T20:27:08Z2017-01-20T20:34:56Z
Recall that the Baron proposed a pair of dice contests in which Sir R-----, were he to best the Baron's score, stood to win a bounty of thirteen coins.
Upon paying his stake Sir R----- was to cast his die but, if unhappy with its outcome, could pay a further coin to cast it again. Likewise, if he were not satisfied with the second cast, he could elect to cast a third time for a further two coins. He could continue in this fashion for as long as he pleased with the cost rising by one coin for each additional cast of his die. The Baron was to have but a single cast of his die, with Sir R----- to determine whether after or before his own play according to his stake; seven coins for the former and eight for the latter.
student
Recall that the Baron proposed a pair of dice contests in which Sir R-----, were he to best the Baron's score, stood to win a bounty of thirteen coins.
Upon paying his stake Sir R----- was to cast his die but, if unhappy with its outcome, could pay a further coin to cast it again. Likewise, if he were not satisfied with the second cast, he could elect to cast a third time for a further two coins. He could continue in this fashion for as long as he pleased with the cost rising by one coin for each additional cast of his die. The Baron was to have but a single cast of his die, with Sir R----- to determine whether after or before his own play according to his stake; seven coins for the former and eight for the latter.
]]>
Monte Carlo Or Bust - a.k.tag:www.thusspakeak.com,2017:/ak//9.2202017-01-06T20:00:00Z2017-01-06T20:10:45Z
We have taken a look at a few different ways to numerically approximate the integrals of functions now, all of which have involved exactly integrating simple approximations of those functions over numerous small intervals. Whilst this is an appealing strategy, as is so often the case with numerical computing it is not the only one.
a.k.
We have taken a look at a few different ways to numerically approximate the integrals of functions now, all of which have involved exactly integrating simple approximations of those functions over numerous small intervals. Whilst this is an appealing strategy, as is so often the case with numerical computing it is not the only one.
]]>
Finally On The Wealth Of Stations - studenttag:www.thusspakeak.com,2016:/student//12.2182016-12-16T20:09:51Z2016-12-16T20:16:59Z
In our recent investigations we have found that games comprising of random returns upon funds, of random trades between players and of random outcomes of labour, trade and sustenance, with the latter subject to some bare minimum of expenditure, invariably rewarded a fortunate few at the expense of an unfortunate many, despite having rules that applied perfectly equitably to all.
For our final analysis, my fellow students and I have sought to develop a rule by which we might cuff the hands of providence!
student
In our recent investigations we have found that games comprising of random returns upon funds, of random trades between players and of random outcomes of labour, trade and sustenance, with the latter subject to some bare minimum of expenditure, invariably rewarded a fortunate few at the expense of an unfortunate many, despite having rules that applied perfectly equitably to all.
For our final analysis, my fellow students and I have sought to develop a rule by which we might cuff the hands of providence!
]]>