I started trying this out using playing cards - 2 queens and 2 kings and using the queen of spades as 'Emma'. But it got rather tedious.
So I wrote a small program to simulate the choices:
Here: http://www.ukskeptics.com/births.php
You can choose the number of pairs of children (up to 30,000)
The percentage of girls whose name is Emma. If you choose 100% it means that any girl/boy combination will result in the girl being named Emma and in a girl-girl pair one of them will definitely be called Emma.
If you choose 50%, 20% etc. then the chances of a girl being named Emma reduce accordingly.
If you tick 'display output' it outputs a table of all the combinations made.
It turns out that whatever combination of choices you make, 'Emma' will be paired with another girl 33% of the time and with a boy 67% of the time.
Unless I've made an error.
Here's the page code for any programmers to inspect (yes it's probably poorly coded as I did it ad hoc off the top of my head - so no criticism required
):
Code:
<!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title> New Document </title>
<meta name="Generator" content="EditPlus">
<meta name="Author" content="">
<meta name="Keywords" content="">
<meta name="Description" content="">
</head>
<body>
<?php if($_POST['no_of_pairs']>30000){$_POST['no_of_pairs']=30000;}//prevents server throwing out an error ?>
<form name="form1" method="post" action="">
<table width="95%" border="1" align="center" cellpadding="2" cellspacing="2" bordercolor="#000000" bgcolor="#aabbaa">
<tr align="center">
<td width="33%">Number of pairs of children
<input name="no_of_pairs" type="text" id="no_of_pairs" value="<?php if(isset($_POST[no_of_pairs])){echo($_POST[no_of_pairs]);} else {echo("10");} ?>" size="5" maxlength="5"></td>
<td width="34%">Percentage changed to Emma
<select name="percent_of_emma" id="percent_of_emma">
<option value="1" <?php if($_POST[percent_of_emma]==1){echo("selected");} ?>>100</option>
<option value="2" <?php if($_POST[percent_of_emma]==2 || $_POST[percent_of_emma]==""){echo("selected");} ?>>50</option>
<option value="3" <?php if($_POST[percent_of_emma]==3){echo("selected");} ?>>33</option>
<option value="4" <?php if($_POST[percent_of_emma]==4){echo("selected");} ?>>25</option>
<option value="5" <?php if($_POST[percent_of_emma]==5){echo("selected");} ?>>20</option>
<option value="6" <?php if($_POST[percent_of_emma]==6){echo("selected");} ?>>17</option>
<option value="10" <?php if($_POST[percent_of_emma]==10){echo("selected");} ?>>10</option>
<option value="20" <?php if($_POST[percent_of_emma]==20){echo("selected");} ?>>5</option>
<option value="50" <?php if($_POST[percent_of_emma]==50){echo("selected");} ?>>2</option>
<option value="100" <?php if($_POST[percent_of_emma]==100){echo("selected");} ?>>1</option>
<option value="200" <?php if($_POST[percent_of_emma]==200){echo("selected");} ?>>0.5</option>
<option value="1000" <?php if($_POST[percent_of_emma]==1000){echo("selected");} ?>>0.1</option>
</select></td>
<td width="33%">Display output
<input name="display_output" type="checkbox" id="display_output" value="checked" <?php if($_POST[display_output]=="checked"){echo("checked");} ?>></td>
</tr>
</table>
<p align="center">
<input type="submit" name="Submit" value="Submit">
</p>
</form>
<p>
<?php
if ($_POST[Submit])
{
$count=$_POST[no_of_pairs];//number of pairs of births
if($count==0){$count=1;}
for($i=0; $i<$count; $i++)
{
$first_born=rand(1,2);
$second_born=rand(1,2);
if($first_born==1){$first_child="Boy";}
if($first_born==2){$first_child="Girl";}
if($second_born==1){$second_child="Boy";}
if($second_born==2){$second_child="Girl";}
//randomly assigns first/scond born as boy or girl
if($first_child == "Girl" || $second_child == "Girl")
//if at least one is a girl, give the random option to name one Emma
{
$change=rand(1,$_POST[percent_of_emma]);//second figure can be changed to reduce the occurences percentage
if ($first_child=="Boy" && $change==1){$second_child="Emma"; $change=0;}
if ($second_child=="Boy" && $change==1){$first_child="Emma"; $change=0;}
if ($first_child=="Girl" && $second_child=="Girl" && $change==1)
{
$choice=rand(1,2);
if($choice==1){$first_child="Emma";}
if($choice==2){$second_child="Emma";}
}
}
$numbers[$i][0]=$first_born;
$numbers[$i][1]=$second_born;
$output[$i][0]=$first_child;
$output[$i][1]=$second_child;
//numbers array keeps track of male/female. Output keeps track of boy or girl/emma
}
for($i=0; $i<$count; $i++)
{
if ($output[$i][0]=="Emma" || $output[$i][1]=="Emma")
$end=1;//routine to count how may boys/girls Emma matches with
{
if($output[$i][0]=="Emma" && $output[$i][1]=="Boy" && $end==1){$emma_boy+=1;$end=0;}
if($output[$i][0]=="Emma" && $output[$i][1]=="Girl" && $end==1){$emma_girl+=1;$end=0;}
if($output[$i][0]=="Boy" && $output[$i][1]=="Emma" && $end==1){$emma_boy+=1;$end=0;}
if($output[$i][0]=="Girl" && $output[$i][1]=="Emma" && $end==1){$emma_girl+=1;}
}
}
$pop=$count*2;//the population is double the number of pairs of children!
for($i=0; $i<$count; $i++)
{
if ($numbers[$i][0]==1){$no_boys+=1;}
if ($numbers[$i][0]==2){$no_girls+=1;}
if ($numbers[$i][1]==1){$no_boys+=1;}
if ($numbers[$i][1]==2){$no_girls+=1;}
if ($output[$i][0]=="Emma"){$no_emma+=1;}
if ($output[$i][1]=="Emma"){$no_emma+=1;}
if ($numbers[$i][0]==1 && $numbers[$i][1]==1){$boy_boy+=1;}
if ($numbers[$i][0]==1 && $numbers[$i][1]==2){$boy_girl+=1;}
if ($numbers[$i][0]==2 && $numbers[$i][1]==1){$girl_boy+=1;}
if ($numbers[$i][0]==2 && $numbers[$i][1]==2){$girl_girl+=1;}
}
}
?>
</p>
<table width="75%" border="1" align="center" cellpadding="4" cellspacing="4">
<tr>
<td width="50%"><strong>Population</strong></td>
<td width="25%" align="right"><?php echo($pop); ?> </td>
<td width="25%"><div align="center"><strong>Percentage</strong></div></td>
</tr>
<tr>
<td>Number of boys</td>
<td align="right"><?php echo($no_boys); ?> </td>
<td align="right">
<?php if (isset($pop))$var=round($no_boys/$pop*100,2); echo($var); ?>
</td>
</tr>
<tr>
<td>Number of girls</td>
<td align="right"><?php echo($no_girls); ?> </td>
<td align="right">
<?php if (isset($pop))$var=round($no_girls/$pop*100,2); echo($var); ?>
</td>
</tr>
<tr>
<td>No of Emmas</td>
<td align="right"><?php echo($no_emma); ?> </td>
<td align="right">
<?php if (isset($no_girls))$var=round($no_emma/$no_girls*100,2); echo($var); ?>
</td>
</tr>
<tr>
<td> </td>
<td align="right"> </td>
<td align="right"> </td>
</tr>
<tr>
<td>Boy-Boy</td>
<td align="right"><?php echo($boy_boy); ?> </td>
<td align="right">
<?php if (isset($count)){$var=round($boy_boy/$count*100,2);echo($var);} ?>
</td>
</tr>
<tr>
<td>Boy-Girl</td>
<td align="right"><?php echo($boy_girl); ?> </td>
<td align="right">
<?php if (isset($count))$var=round($boy_girl/$count*100,2);echo($var); ?>
</td>
</tr>
<tr>
<td>Girl-Boy</td>
<td align="right"><?php echo($girl_boy); ?> </td>
<td align="right">
<?php if (isset($count))$var=round($girl_boy/$count*100,2);echo($var); ?>
</td>
</tr>
<tr>
<td>Girl-Girl</td>
<td align="right"><?php echo($girl_girl); ?> </td>
<td align="right">
<?php if (isset($count))$var=round($girl_girl/$count*100,2);echo($var); ?>
</td>
</tr>
<tr>
<td> </td>
<td align="right"> </td>
<td align="right"> </td>
</tr>
<tr>
<td>Emma matched with Boy</td>
<td align="right"><?php echo($emma_boy); ?> </td>
<td align="right"><?php if (isset($no_emma))$var=round($emma_boy/$no_emma*100,2); echo($var); ?> </td>
</tr>
<tr>
<td>Emma matched with Girl</td>
<td align="right"><?php echo($emma_girl); ?> </td>
<td align="right"><?php if (isset($no_emma))$var=round($emma_girl/$no_emma*100,2); echo($var); ?> </td>
</tr>
</table>
<?php
if ($_POST[display_output]=="checked")
{
echo("<br><br><br><div align=\"center\"><b>Data output table</b><br></div>");
echo("<table align=\"center\" border=\"1\">\n<tr>");
$cols=12;//number of table columns
for($i=1; $i<=$count; $i++)
{
print("<td>".$output[$i-1][0]."-".$output[$i-1][1]."</td>");
if ($i<$count && $i%$cols==0){echo("</tr>\n<tr>");}
}
echo("</tr></table>");
}
?>
</body>
</html>
So, it does seem as if knowing the name of one girl doesn't make the reduce the increase the probability of her having another sister from 33% to 50% after all.
Bookmarks