Tuesday, November 24, 2015

Econometrics Beat: Dave Giles' Blog: November Reading

Econometrics Beat: Dave Giles' Blog: November Reading: Somewhat belatedly, here is some suggested reading for this month: Al-Sadoon, M. M ., 2015. Testing subspace Granger causality. Barcel...

Monday, April 14, 2014

Ship, Captain & Crew - A Statistical Voyage


The Game

Ship, Captain and Crew is a game played with five 6-sided dice, in which the object of the game is to score the most points.  Each player throws all five dice, and attempts to sequentially, or simultaneously acquire the ship (6), the captain (5), and the crew (4); these dice are removed from play after they are obtained, leaving two dice (the "cargo") with which to score points.  The principal challenge is in obtaining the ship at the same time, or before obtaining the captain, which likewise must be obtained at the same time, or prior to, obtaining the crew.



Impressions

I first played this game in a clubhouse in Ocean Springs, Mississippi about 10 years ago with my future Father In-Law.  We sat at a bar with some grizzled veterans, and played numerous rounds, wagering for drinks and small change.  My first impression was of a simple dice game, and indeed it is a simple and easy game to learn. However, following a thorough examination of the probabilities I now have a better understanding of the game, and a greater appreciation for the mechanics of play.


Objective

The objective of the game is to score the most points, and since points themselves are only possible with the ship, captain and crew, therefore my principal objective was to calculate the probability of getting ship, captain and crew in three or fewer rolls.


Difficulties

With five dice, there are 7776 different combinations on the first roll, and statistical analysis of this game is further complicated by multiple nested conditional probabilities.  For example, the probability of obtaining the crew on the third roll is conditional on the probability of obtaining the ship and captain on the first and/or second and/or third rolls. Additional considerations are 3 and 4 dice rolls, and probabilities of not rolling numbers during some rolls.


Methods

Conditional probability analysis, empirical analysis using Monte Carlo heuristics, and brute force tallies of exhaustive combinatorial data using programs written in Visual Basic and PHP were used.  Often one or two of these methods were used to verify results obtained from the other(s).



Findings

 
Probability of rolling Ship, Captain and Crew at any time during a round:  53.9%

Probability of rolling Ship, Captain and Crew on the first roll: 15.8%
Probability of rolling Ship, Captain and Crew in exactly two rolls (exclusively): 19.8%
Probability of rolling Ship, Captain and Crew in exactly three rolls (exclusively): 18.3%




Probability of rolling Ship and Captain only at any time during a round: 23.6%
Probability of rolling Ship only during a round: 15.9%
Probability of not rolling any Ship, Captain, or Crew during round: 6.6%



Summary

I refer to rolling Ship, Captain and Crew (SCC) on the first roll as "Royal", because it's the highest flag on a tall ship. Rolling a Royal occurs 15.8% of the time, or about one time out of six.  Rolling SCC after exactly two rolls occurs 19.8% of the time. Therefore the probability of rolling SCC by the second roll ("Gallant") is 35.6%.  Rolling SCC after exactly three rolls (i.e., no SCC prior to third roll) is 18.3%.  Thus the probability of rolling SCC at any time during the round is 53.9% (I refer to this as "Course").
 
I was surprised that the probability of achieving Ship, Captain and Crew (SCC) during a single round was greater than half.  Of course the player will have more control, and potentially do better if SCC are obtained early. The press-your-luck mechanics of the game exists only for players who have achieved SCC on the first or second rolls.  Rolling SCC on the first roll leaves two additional rolls for the player to potentially increase their points.  The longer it  takes to achieve SCC, the less control the player has. Rolling SCC on the third rolls means the player accepts whatever remains (7 points, on average).

One implication of these findings is that there may be alternative designs for this game with similar probabilities.  This may be useful for game designers. For example, one might replace three of the 6-sided dice with a single 12-sided die, a dodecahedron: two faces of the die would be marked to represent Royal, three sides to represent Gallant, and two sides to represent Course, and the five remaining sides to represent no points.  Players who roll a Royal or a Gallant on the single roll of the dodecahedron could then re-roll the two 6-sided dice twice or once, respectively.


Future Considerations

This bit of preliminary research focused only on the probabilities associated with achieving SCC.  Yet how much does achieving SCC early in the game affect the potential to increase points when compared to achieving SCC later? Future work should consider the marginal impacts of Royal and Gallant on points.

Thursday, January 3, 2013

Estimating Airline Maintenance Costs

Here are the results of an ad-hoc analysis of airline maintenance costs for 2011 using data from the Bureau of Transportation Analysis (RITA, Schedule P-5.2). Maintenance costs includes airframe (52251 and 52461) and engines (52252 and 52462);  these data were regressed on Total Aircraft Airborne Hours(z6500) and gallons of aircraft fuel (51451).  All data in thousands. 

The results suggests marginal costs of $22.50 per hour of flight time, and $0.201 per gallon of fuel.


Sunday, December 9, 2012

Jet Kerosene and Crude Oil



Data is from the annual nominal data from the U.S. Energy Information Administration

Sunday, November 11, 2012

Academic Affairs

Five types of questions one might be expected to answer during an interview for the position of Associate Dean of Academic Affairs:

1.  Leadership Style
2. Student Issues
3. Supervisory Experience
4. Master Planning
5. Evaluation of Faculty and Staff

Sunday, May 6, 2012

How to Add Users Remotely to a phpBB 3 forum with PHP

<?php
 

define('IN_PHPBB', true);

$phpEx = substr(strrchr(__FILE__, '.'), 1);


require($phpbb_root_path ."common.". $phpEx);
$user->session_begin();
$auth->acl($user->data);
$user->setup();

// Contains the user_add function
require("myForum/includes/functions_user.php");



//still nedd to validate user name and strip non chars.

$username = "IamTesting";
$email_address = "iam@testing.com";
$password = "sUperSeCURE92E#$";
$registration_time = time();
$group_id = 2;


$user_row = array(
    'username'              => $username,
    'user_password'         => phpbb_hash($password),
    'user_email'            => $email_address,
    'group_id'              => (int) $group_id,
    'user_regdate'          => $registration_time,
    'user_type'             => '0',
);



//uncomment the following line to display the array
//print_r($user_row);

// all the information has been compiled, add the user
// tables affected include: users table, 

// profile_fields_data table, groups table, and config table.
 

$user_id = user_add($user_row);

?>

Website Reboot 2012

Making plans to add some new projects this year.  And here's a preview of the new look. giwiganz.com