Gye Greene's Thoughts

Gye Greene's Thoughts (w/ apologies to The Smithereens and their similarly-titled album!)

Thursday, January 01, 2015

How I spent New Year's Eve day

New Year's Eve was spent quietly, with the family: the kids actually managed to stay awake until midnight -- even B2, who usually wanders off and falls asleep before everyone else.

But the day of New Year's Eve, I spent puttering about with a "marble maze" kit -- or rather, three of them combined -- experimenting with binomial distributions.

Because, you know -- that's what you do on vacation.




Note that I make some comments in there that alludes to OCD-ness.  If I was **truly** OCD, then I would've done more than five iterations.  ;)


--GG

Labels: , ,

Sunday, June 01, 2014

Spurious correlations

Hat-tip to Old Roommate for telling me about this website of spurious correlations.

For the non-statistical:  a correlation is a mathematical relationship between two measures, that ranges from -1.0 to 0.0 to  1.0.  The further from zero the relationship is (the correlation), the larger the mathematical relationship.  A correlation of 0.0 means that there is no discernible relationship:  any connection is totally random.  A correlation of +1.0 means that the two things are completely locked together.  And a correlation of -1.0 means that as one thing increases, the other perfectly decreases -- and vice-versa.

The human tendency is to think that  these two things might be causally related.  But it ain't necessarily so.


Two examples from the website:


and



Ayep!


--GG

Labels: ,

Friday, July 27, 2012

I really like my job

Something I realized after work yesterday -- and still believe it today -- is that I really like my job.


My current job is relatively new:  the government dissolved my old agency in May, so I've only been at my current place about two months.  And it deals with a slightly different subject matter (although broadly ''criminology'') than my old job, and works the with the data slightly differently.

But!  Because I'm forced to use a spreadsheet program (Excel) rather than statistical software (SPSS or Stata) to manipulate the data, I'm learning a whole new approach:  I'm now (finally!) at the point where I can basically do all the data-related things in Excel that I used to be able to do in SPSS or Stata.

And, in my new job, my two roles seem to be to run analyses on data, and be the coordinator of data quality issues.  Running the analyses, I enjoy.  And coordinating the data quality means that I get to tap into my latent I.T. Guy orientation:  I have enough of an understanding of both database issues and data-crunching needs that I can bridge the gap, and speak the lingo -- possibly better than anyone else on my team.


My insights of ''Hey!  I actually **really** enjoy my job'' came about because all I did on Thursday and Friday was nut out (and accomplish!) a moderately challenging analaysis, in between assorted meetings with the database people to troubleshoot some data quality issues.

I get to interact with the database people enough that I get to influence what they do and how they do it -- but not so much that I have to actually learn SQL or write the code.  I'm in the perfect in-between zone.


Interesting; intellectually challenging; good stuff!!!   :)


--GG

Labels: , , ,

Wednesday, June 06, 2012

Big and tall sign

Found this sign about a block away from the place where I'm doing the MS Excel training.


Two things I appreciated about it.  One is that  ''significant man'' is a innovative euphemism for ''really big guy''.

For the second thing -- you'll probably have to click on the photo to enlarge it.  And even then, most of you won't get the joke.


--GG

Labels: ,

Tuesday, May 01, 2012

Probability

I
I took this photo on March 31st.  It's The Girl, keeping a tally of all the numbers that come up when you roll the pictured dice.

Each of the kids has a six-sided die -- and each is a different color, so each kid knows whose is whose.  They were playing a game that's kind of like ''heads or tails'', but with six options instead of two:  everyone picks a number from one through six, and then the die is rolled until someone's guess comes up; the person with the correct guess is the winner.

(I came up with this because with three children in the house, this is more equitable than trying to do ''heads or tails'' -- where each time, someone would have to be left out of the game.)

The Girl was complaining that her die (the pink one) wasn't fair -- that it kept coming up with the same number. So, I suggested that we test it.

And, that's what we're doing:  I roll the die, and call out the result; she adds it to the tally.

As you can see, it's not **quite** evenly distributed yet:  the fours and fives are ahead.  But the other numbers are starting to catch up.

By the way:  from a statistical point of view, we'd have to roll the die 200-300 time to have a sufficiently decent baseline to determine whether the die is **truly** unbalanced.   


--GG

Labels: , ,

Wednesday, March 07, 2012

Stats bilingual

In grad school, I started off with SPSS. Then for my Ph.D., I used Stata. I used Stata for all my research work since then.

But then at my current job (which I've now been at for more than a year!), I've been using SPSS -- because that's what was available.

And then, **now I have Stata again!!!


Although -- even though in previous posts I've clearly preferred Stata, it's not perfect: there are some advantages to SPSS. Stata maxes out at 1GB file sizes (for non- 64 bit computers), and (unlike with SPSS) you can't display the value **and** the value label at the same time (e.g. if 1=male and 0= female, you can have the percentage tables show "1" and "0" **or** "male" and "female" -- but not both at the same time).

But, I prefer how Stata handles missing values: you can toggle on or off whether you want missings to be displayed -- and you actually have the **choice** to include them in your percentage tables (whereas in SPSS it's not possible to display them.) On Stata, the default is to break on error -- and you can defeat that if you like -- whereas SPSS just plows through the whole script, and there's no way to get it to stop when it hits an error (I confirmed this with SPSS tech support).


And, I think the scripting language is cleaner in Stata. Below is a script in Stata, and then a functionally equivalent script in SPSS.



*IN STATA .

generate isolated_location_YES = Off_Loc_Isol_Recode
label value isolated_location_YES yesoth

replace isolated_location_YES=1 if Off_Loc_Isol_Recode==2
replace isolated_location_YES=0 if Off_Loc_Isol_Recode==1


*Verifying .

tab2 isolated_location_YES Off_Loc_Isol_Recode



*IN SPSS .

compute isolated_location_YES = Off_Loc_Isol_Recode .
value labels isolated_location_YES 1 "Yes" 0 "No, other situation" .
execute .

if(Off_Loc_Isol_Recode=2) isolated_location_YES=1 .
if(Off_Loc_Isol_Recode=1) isolated_location_YES=0 .
execute .


*Verifying .

crosstabs /tables= isolated_location_YES by Off_Loc_Isol_Recode .


Same number of lines; but less typing with Stata.


Anyhow, it's interesting because now that I have both programs at work, I switch back and forth between them. It's like trying to switch between French and Spanish: similar, but with important differences -- such as in SPSS you must end each line with a period; but in Stata, that's an error. Or using ''double equals'' for conditional equivalencies (e.g. if gender equals 'male') in Stata, but single equals in SPSS.


But -- **extra** geeky. So it's all OK. :)


--GG

Labels: , , , ,

Monday, August 22, 2011

Good days

I had two pleasant evenings.


Sunday night, after the kids went to bed, I spent two hours doing music stuff: typing up some song lyrics I'd recently scribbled onto a notepad (i.e. new song!!!); trying out an old drum machine (Boss DR-110 -- I'll let you Wikipedia it) and getting it to work; then working out the guitar chords to the new song, as well as tightening up some of the lyrics.

Good stuff. I'd meant to also lay down some basic tracks, but I didn't get that far.


Then, Monday night (tonight) I spent a few hours mucking about with some business data from Old Roommate. Trying to find patterns in data -- and trying to work out how to bend Stata (the software) to my will.

Again, good stuff.


So, two pleasant evenings. Although I should've gone to bed about an hour ago. ;)


--GG

Labels: , , ,

Wednesday, August 03, 2011

Bilingual

A little tricky: last weekend finally got around to working on some data for Old Roommate. Prior to starting my current job, I'd been using Stata (statistical software), which has its own scripting language.

However, since the end of January, I've been using SPSS (statistical software), which has a different scripting language. So, this weekend was the first time I've used Stata in a few months. So all of my new habits (using single "equals" for logical equivalencies; ending statements with a period) are nowin the way of my old habits. Gah! Tricky.

Like moving from Italy to France, then back to Italy.


--GG

Labels: , ,