## Random Friday Lowercase-A arguments

My wife and I tend to *lowercase-a argue* about random stuff. We have a good time, though, it's part of our collective charm. We have "gentleman's bets." There was a good one yesterday while we were watching TV..."which of those chicks is a dude." Seriously, don't ever test my 'trannydar', you'll always lose.

Anyway, here's two recent ~~arguments~~ questions:

**#1.** A relative was reviewing the information of correlation that he'd learnt some time ago in statistics. It is possible for sets of data to be perfectly correlated, with a linear correlation co-efficient of 1, although this is very rare. Sets of data can also be correlated in a non-linear fashion such as in the form of a binomial or other polynomial function.

He was looking at his energy bills over the past year in comparison with the average monthly temperatures over the same period, and have come up with the following data (currency values converted to US dollars). What sort of relationship can you deduce, if any, between the bill and the temperatures (in Fahrenheit)? Can we say there is any correlation between the data?

AverageBill/$,150,140,137,118,110,90,84,82,96,98,120,143

AverageMonthlyTemperature,38,41,45,48,54,57,64,69,77,79,85,90

**#2.** Discussion around this one went on animatedly for hours, and she's still not convinced. I've pasted it in her original phrasing so as not to get into more trouble. ;)

1a. What is the probability of two siblings having the same birthday (month and day)? (Specifically not twins. We're looking for the probability of siblings having say, January 1st or December 25th as their birthday.)Please explain your answer, I wouldn't want Scott to get too lost!

1b. Does your answer to 1a change if one of the siblings has already been born, and the other isn't? Again, we're looking for an explanation along with the answer.

An answer or two (maybe the right ones? Who knows?) will be added to this post tomorrow.

#### About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. I am a failed stand-up comic, a cornrower, and a book author.

About Newsletter

For #2, it's clearly 1/365. (Because this a birthday problem, not _the_ birthday problem.) Here's a quick C++ program to prove it:

#include <iostream>

#include <cstdlib>

using namespace std;

const int MAX=1000000;

int nonpredetermined(void)

{

int matches = 0;

for (int i=0;i<MAX;++i)

{

int birthday1 = rand()%365;

int birthday2 = rand()%365;

if (birthday1==birthday2)

{

++matches;

}

}

return matches;

}

int predetermined(void)

{

int matches = 0;

int birthday1 = rand()%365;

for (int i=0;i<MAX;++i)

{

int birthday2 = rand()%365;

if (birthday1==birthday2)

{

++matches;

}

}

return matches;

}

int main(void)

{

cout << "Percentage of congruent birthdays with neither pre-determined: " << static_cast<double>(nonpredetermined())/MAX << "\n";

cout << "Percentage of congruent birthdays with one pre-determined: " << static_cast<double>(predetermined())/MAX << "\n";

}