This blog has been silent for a few months as I've been busy grinding out yet another term at ye old G of U. I've decided to revive it for at least one post. Politics? ... no. God? ... kinda but not really. Math? Hellz yeah! Below, is the result of a simple probability experiment.
The probability space consisted of two games of Settlers of Catan. The first, with our good friends Gerry, Ryann, Aaron, and Megan, was played Friday night. The second, with family, Jim, Madelyn, Marjorie, and Eric, was played Saturday afternoon. For those who don't know, Settlers is a board game with a dice-rolling component. Like other games involving dice, your success in Settlers is largely dependent on the roll of the die. Which brings us to the trials, which were the outcomes of the roll of two dice. These were meticulously recorded on sticky notes, likely to the mild consternation of friends and family. Below is the MATLAB code I wrote to process the data and generate meaningful results.
Conclusions:
1. For game 1, and game 2, note the deviant 9s and 11s, respectively. Each in their own game had a large part in me not winning... or so I tell myself.
2. Notice how, for the sum of the two games, the dice rolls are already beginning to converge on the normal distribution. That is, the deviation decreases for increasing numbers of trials.
Enjoy!
----------------------------------------------------------------------------
% Random data vectors collected from the dice rolls of two separate games
% of Settlers
dataVec1 = [ 8 6 6 8 8 6 3 7 4 9 6 10 5 4 11 10 10 9 4 9 3 7 9 ...
4 7 5 9 5 9 7 4 3 4 2 5 9 7 6 8 9 3 6 9 10 2 2];
dataVec2 = [ 6 8 4 8 12 10 5 5 4 11 7 11 7 10 11 6 3 6 7 6 6 6 ...
8 3 5 11 7 4 7 6 7 6 11 12 10 11 8 4 4 7 6 3 7 7 6 ...
5 4 4 8 11 6 9 5 9 11 3 8 8 11 7 7 11 5 7 6];
%The range of valid results. That is, dice rolls can only sum to
%values between 2 and 12
range = 2:12;
%Psuedorandom data generated to simulate normal distribution over
%a miilions dice rolls.
bigNum = 10^6;
die1 = randi(6, 1, bigNum); %die1 is a vector of length bigNum
die2 = randi(6, 1, bigNum); %containing values between 1 and 6
randVec = die1 + die2;
%the normal distribution vector
distNorm = histc(randVec,range)/length(randVec);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%the distribution corresponding to game 1
%the distribution vector for game 1
dist1 =histc(dataVec1,range)/length(dataVec1);
% the distribution deviation vector
dist_dev = -abs(dist1 - distNorm);
% the matrix whose columns are distribution vectors
dist_matrix = 100.*transpose([dist1 ; distNorm; dist_dev]);
% bar graph
bar(range, dist_matrix );
% instructions for format
title('Probability Distribution of Dice Rolls');
xlabel('value of the roll');
ylabel('resultant probability associated with given roll, as a %');
leg1 = 'distribution for game 1';
leg2 = 'Normal distribution- based on one-million psuedo-random rolls';
leg3 = 'deviation value';
legend(leg1, leg2, leg3, 'Location', 'SouthOutside'); grid; pause;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%the distribution corresponding to game 2
dist2 = histc(dataVec2,range)/length(dataVec2);
dist_dev = -abs(dist2 - distNorm);
dist_matrix = 100.*transpose([dist2 ; distNorm; dist_dev]);
bar(range, dist_matrix );
% plot format
title('Probability Distribution of Dice Rolls');
xlabel('value of the roll');
ylabel('resultant probability associated with given roll, as a %');
leg1 = 'distribution for game 2';
leg2 = 'Normal distribution- based on one-million psuedo-random rolls';
leg3 = 'deviation value';
legend(leg1, leg2, leg3, 'Location', 'SouthOutside'); grid; pause;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%the distribution corresponding to the sum of games 1 & 2
%concatenate data from both games
dataSum = (horzcat(dataVec1, dataVec2));
distSum = histc(dataSum,range)/length(dataSum);
dist_dev = -abs(distSum - distNorm);
dist_matrix = 100.*transpose([distSum ; distNorm; dist_dev]);
bar(range, dist_matrix );
title('Probability Distribution of Dice Rolls');
xlabel('value of the roll');
ylabel('resultant probability associated with given roll, as a %');
leg1 = 'distribution for sum of games 1 & 2';
leg2 = 'Normal distribution- based on one-million psuedo-random rolls';
leg3 = 'deviation value';
legend(leg1, leg2, leg3, 'Location', 'SouthOutside'); grid;
![]() |
| GAME 1 |
![]() |
| GAME 2 |
![]() |
| Both of 'em |


