Week 20: The Chi-Square Test of Independence
Hello, people! Today we’re going to talk about another chi-square test: the chi-square test of independence!
When Would You Use It?
The chi-square test of independence is a nonparametric test used to determine if the two variables represented in a contingency table are independent of one another.
What Type of Data?
The chi-square test of independence requires categorical or nominal data.
Test Assumptions
- The data represent a random sample of independent observations.
- The expected frequency of each cell in the contingency table is at least 5.
Test Process
Step 1: Formulate the null and alternative hypotheses. The data appropriate for this type of test is usually summarized in an r x c table, where r is the number of rows of the table and c is the number of columns of the table (see the example below to get a better understanding of this). The null hypothesis claims that the in the population from which the sample was drawn, the observed frequency of each cell in the table is equal to the respective expected frequencies of each cell in the table. The alternative hypothesis claims that for at least one cell, the observed and expected frequencies are different.
Step 2: Compute the test statistic. The test statistic here, unsurprisingly, a chi-square value. To compute this value, use the following equation:

Eij, the expected cell count for the ijth cell, is calculated as follows:

Step 3: Obtain the critical value. The critical value can be obtained using a chi-square table (such as this one here). Find the column corresponding to your specified alpha-level, then find the row corresponding to your degrees of freedom. The degrees of freedom is calculated as df = (r – 1)(c – 1), where r is the number of rows in the table and c is the number of columns in the table. Compare your obtained chi-square value to the value at the intersection of your selected alpha-level and degrees of freedom.
Step 4: Determine the conclusion. If your test statistic is equal to or greater than the table value, reject the null hypothesis. If your test statistic is smaller than the table value, fail to reject the null (that is, claim that the observed cell frequencies match those of the expected cell frequencies).
Example
The example I’ll use today involves looking at some Nobel Prize data. Specifically, I want to see if the category of Nobel Prize (chemistry, physics, etc.) is independent of gender. The data come from here. The sample size I used was n = 761; I omitted organizations who had won the award and just looked at individuals. I also chose to omit the “Economics” category, as that had been the most recently added and did not have a lot of observations for either gender yet. Set α = 0.05.
H0: Nobel Prize category is independent of gender
Ha: Nobel Prize category is not independent of gender
Observed counts are in the following table:

The expected cell counts, as calculated by the Eij formula above, are displayed in the following table:

Calculating the chi-square value gives us:

The degrees of freedom for this test is df = (5 – 1)(2 – 1) = 4, which gives us a critical chi-square value of 9.488 by the table. Since our calculated chi-square value, 32.894, is larger than the table value, this suggests that we reject the null and claim that prize category and gender are not independent.
Oh my god, shoes.
KINVARA HAUL!

Tri-State happened to have three pair in my size (two of the pairs were the new Kinvara 7s!), so I did what I had to do.
I’m not ashamed.
(Hopefully these will last me the rest of the year at least.)
OH GOD IT’S FRIDAY THE 13TH I’D BEST DO A SURVEY TO WARD OFF BAD LUCK
Name: Claudia
Blood Type: O+
Nickname: I don’t have a consistent one.
Relationship Status: Engaged to the best man on the planet, thank you very much
Zodiac Sign: Aquarius
Favourite TV Show: Metalocalypse. I don’t care that it’s over, I love it
Long or Short Hair: It’s decently long now, I guess
Height: 5’2.5”
Do you have a crush on someone: I’m pretty sure it’s beyond a crush at this point, haha
What do you like about yourself: *Nathan Explosion voice* NOOOOOOOOOOTHIIIIIIIIIIING!
Right or Left Handed: Right handed
List of three favourite colours: Orange, yellow, lime green
RIGHT NOW
Eating: Nothing
Drinking: Nothing
I’m about to: BREAK
Listening to: The TV
Kids: GOD NO
Get Married: Is that a command? DO YOU DARE ME TO GET MARRIED?! I’ll do it, watch me!
Career: Hopefully something in stats, and hopefully soon
MOST RECENT
Drink: Water
Phone Call: Nate
Song you listened to: Tightrope by WALK THE MOON
HAVE YOU EVER
Dated Someone Twice: Nope
Been Cheated On: Indeed
Kissed Someone and Regretted It: Yes
Lost Someone Special: Apart from my grandma and grandpas, no one super close and special, no
Been Depressed: Yes
Been Drunk and Thrown Up: I’ve never been drunk
Kissed a Stranger: No
Had Glasses or Contacts: I’ve got glasses right now!
Had Sex on the First Date: Nope
Broken Someone’s Heart: Maybe? Not sure
Turned Someone Down: Just the stalkers
Cried when Someone Died: Yup
Fallen for a Friend: Hahahahaha. Haha. Ha. Oh, 2008.
IN THE LAST YEAR HAVE YOU
Made a New Friend: Yes
Fallen out of Love: Nope
Laughed Until you Cried: A few times, yeah
Met Someone Who Changed You: No
Found Out Who Your True Friends Were: Bah
Found Out Someone Was Talking About You: BAH
Kissed Someone on Your FB List: Yes
WHICH IS BETTER:
Lips or Eyes: Eyes
Hugs or Kisses: Depends on who it is
Shorter or Taller: SHORTER, DAMMIT
Romantic or Spontaneous: Every survey has these listed like this, as if they’re opposite. Can’t romance be spontaneous? Can’t spontaneity be romantic?
Sensitive or Loud: LOUDLY SENSITIVE
Hookup or Relationship: Relationship
Troublemaker or Hesitant: Neither?
FIRST
Best Friend: Anastasia. We were a freaking awesome duo, yo
Surgery: Appendicitis?
Sport I Joined: T-ball, bitches!
Vacation: Oregon coast, probably
DO YOU BELIEVE IN
Yourself: NONSENSE
Miracles: Only on 34th street
Love at First Sight: Yup
Heaven: Nope
EXTRAS
How many people from your FB list do you know IRL: All of ‘em
Do you have any pets: Jazzy!
Do you want to change your name: Nope
What did you do for your last birthday: Nothing special. It was a school day, I think
What time did you wake up today: Late, haha
What were you doing last night at midnight: Watching TV with mom
Something you can’t wait for: WEDDING!
Last time you saw your mom: Just a little bit ago
What is one thing you wish you could change about your life: I’d be okay if the thesis stuff was over
Have you ever talked to a person named Tom: My uncle and my old band teacher!
What’s getting on your nerves: Life
TWISTY POO
Oh, America.
Blogopolis
So I completely forgot to show you guys my Excel file full of all my blog data. ‘Cause I’m sure you all care about that, right?
BEHOLD!

Well, okay, this is just the very first part of the very first tab, but basically I’ve got a tab for each blogging year (May to May), containing the blog number (1 through whatever blog post I’m at now), year, month, day of the month, day of the week, how many words are in the post, the number of videos and images in the post, whether or not the post is marked as “private” (needing the password), the category of the post, and the title.
It makes me super happy, yo.
ANYWAY. Just thought you’d like to see from where I was pulling all those statistics I posted last week. I’m not just making crap up, I promise!
Week 19: The Chi-Square Test for Homogeneity
What’s up, y’all? Today we’re going to talk about the chi-square test for homogeneity!
When Would You Use It?
The chi-square test for homogeneity is a nonparametric test used to determine whether or not r independent samples, categorized on a single dimension, are homogeneous with respect to the proportion of observations in each of the c categories.
What Type of Data?
The chi-square test for homogeneity requires categorical or nominal data.
Test Assumptions
- The data represent a random sample of independent observations.
- The expected frequency of each cell in the contingency table is at least 5.
Test Process
Step 1: Formulate the null and alternative hypotheses. The data appropriate for this type of test is usually summarized in an r x c table, where r is the number of rows of the table and c is the number of columns of the table (see the example below to get a better understanding of this). The null hypothesis claims that the in the population from which the sample was drawn, the observed frequency of each cell in the table is equal to the respective expected frequencies of each cell in the table. The alternative hypothesis claims that for at least one cell, the observed and expected frequencies are different.
Step 2: Compute the test statistic. The test statistic here, unsurprisingly, a chi-square value. To compute this value, use the following equation:

Eij, the expected cell count for the ijth cell, is calculated as follows:

Step 3: Obtain the critical value. The critical value can be obtained using a chi-square table (such as this one here). Find the column corresponding to your specified alpha-level, then find the row corresponding to your degrees of freedom. The degrees of freedom is calculated as df = (r – 1)(c – 1), where r is the number of rows in the table and c is the number of columns in the table. Compare your obtained chi-square value to the value at the intersection of your selected alpha-level and degrees of freedom.
Step 4: Determine the conclusion. If your test statistic is equal to or greater than the table value, reject the null hypothesis. If your test statistic is smaller than the table value, fail to reject the null (that is, claim that the observed cell frequencies match those of the expected cell frequencies).
Example
The example for this test comes from Amazon. Specifically, I want to see if the number of 4+ star ratings was homogeneous across the six different price ranges for laptop computers. I chose a random sample of n = 15 from each of the six price ranges and determined how many of the 15 laptops selected had four or more stars for their average review. The observed counts are in the following table:

Set α = 0.05.
H0: The proportion of 4+ star ratings is homogeneous across all price ranges
Ha: The proportion of 4+ star ratings is not homogeneous across all price ranges
The expected cell counts, as calculated by the Eij formula above, are displayed in the following table:

Calculating the chi-square value gives us:

The degrees of freedom for this test is df = (6 – 1)(2 – 1) = 5, which gives us a critical chi-square value of 11.070 by the table. Since our calculated chi-square value, 3.54, is smaller than the table value, this suggests that we fail to reject the null and claim that the proportion of 4+ star ratings is the same for each price category.
Getting ready!
I got my wedding dress today!
It was a pretty fun experience. My mom, Nate’s mom, and I all went down to the David’s Bridal in Calgary and spent my hour and a half appointment time looking at probably six dresses total. I had a tough time choosing between two of the dresses in the end, but I think I chose the right one. It’ll need some alterations (I’m short as hell; plus, they didn’t have my dress size in that style), but it’ll need fewer alterations than the other dress I would have chosen and seems more appropriate to wear for an outdoor summer wedding.
We (Nate, Nate’s brother Curtis, my mom, and I) also went and saw Captain America: Civil War. It was freaking great. Go see it if you’re into that stuff, but don’t go if you’re not caught up on your Marvel movies. You’ll be VERY confused. Just ask my mom.
YAY!
Decade Statistics: Favorites
The last post I want to do for my Decade Statistics week is a post of some of my favorite titles, tags, and survey responses. So let’s get to it!
Favorite Titles
- Complex analysis: it’s all fun and games until someone loses an i.
- A Dutch man once touched an electrically charged French Petri dish. It was a culture shock.
- Are disruptive anti-religious protestors weapons of mass destruction?
- Are Humorous Baristas called Brew-Ha-Has?
- Are invertebrates not allowed to drink Orange Crush?
- Are Leibniz’ fingerprints the best of all possible whorls?
- Are People In R.E.M. Sleep Losing Their Religion?
- Are people on the Atkins diet decarbohydrated?
- Are people who predict golf tournament wins considered fore-casters?
- Are the bulbs of mercury at the bottom of thermometers collectively known as H.G. Wells?
- Are Trivial Jackets just Petticoats?
- Aren’t clones technically carbon copies?
- Do auditioning court jesters have to provide a portFOOLio?
- Do babies deprived of disco exhibit a failure to jive?
- Do geology majors with honors graduate magma cum laude?
- Do ghosts enjoy Boo-lean algebra?
- Do hyperparameters have ADHD?
- Do Narcissistic Bookshelves post Shelfies?
- Do nervous guitarists fret a lot?
- Do obedient consonants respond to a Q queue cue?
- Do philosophy departments have Causal Fridays?
- Do physical comedians suffer from post-dramatic jest disorder?
- Does bread experience social loafing?
- Does Mother Nature drive a Fjord?
- Does |0| = −459.67?
- Had Lord Kelvin done nothing with his life, would he have been an “absolute zero”?
- If two hotels from the same company sleep together, is it considered inncest?
- Is a short spike in self-esteem considered a confidence interval?
- Is a theorem about pickles called a dill lemma?
- Is an admirable bakery product considered a roll model?
- Is Superman’s costume considered his strong suit?
- Would a passionate speech about horology be considered a glockenspiel?
- Of course someone’s always pushing the envelope. Otherwise it’s just stationery.
- Sun Tans: They Don’t Happen Overnight
- Are you ready for another emo Valentine’s Day blog? GOD KNOWS I AM
- Repressed sexual tension durng REM sleep? DON’T MIND IF I DO
- Stop whining or I will TURN THIS BLOG AROUND AND GO HOME
- Flu shots are BOGUS, I have the immune system of Zeus!
- I’m a colorless green idea, and I’m SLEEPING FURIOUSLY!!!!
- If Captain Planet isn’t your hero, you’re a COMMIE
- In Soviet Russia, handle flies off YOU!
- Swiggety swag, what’s in the ba-OH GOD BEES
- I AM ROOMBA HERE ME ROAR
- LET ME ‘SPLAIN YOU A THING, BRO:
- CLAUDIA’S INSANELY HYPER SURVEY OF INSANE HYPERNESS
- CRAIGSLIST YOU ARE MY ONLY COMPANION MAKE HOT SWEET LOVE TO ME YOUR PIC GETS MINE – 22 F
- HELLO GOOD SIR JUST STOPPING IN TO TELL YOU HOW AWESOME LEIBNIZ IS PIP PIP TALLY HO
- I LEFT MY HEART IN SAN FRANSISCO OH SHI—*collapses*
- TUKEY TUKEY BO BUKEY BANANA-FANA FO FUKEY ME MI MO MUKEY…TUKEY!
- *farting noises with mouth*
- Circular reasoning works because circular reasoning works because circular reasoning works…
- A Red Sea and its Better Half are Soon Parted
- I used to teach a failing fly-tying class until I realized my efforts were all for knot.
- I used to work at a bridal shop specializing in headdresses. My work there was to know a veil.
- My new position at the PepsiCo factory isn’t the greatest job in the world, but I’m making Dew
- If you want to eat an apple pie, you must first consume the universe
- In This Blog: Claudia Does a Dumb and Walks a Mile in -31 Degree Weather
- In This Blog: Claudia Drinks 16 oz of Red Bull and Tries to Write Shit
- Claudia the Bad Blogger Gives You YouTube Instead of Actual Content
- You can lead a Claudia to WordPress but you can’t make her update her blog
- “Don’t be afraid. I’m only a toaster. Plug me in. Go on. You’ll like it.”
- Some Days I Miss My Sanity. Other Days I’m Just a Toaster.
- “The Brave Little Toaster Goes to Mars” (or, “Salvador Dali Takes a Film Class”)
- Absolute Zero is a Government Conspiracy
- Emojis are dumb and so is your face
- Shel Silverstein’s “Where the Sidewalk Ends” is actually referring to every other block in Calgary
- Today was the Wrong Day to Wear Parachute Pants: A True Story
- “I just realized I’m illiterate and now I cacng apbtrtht kd thactgs”
- Facebook, you inconsistent freak show
- Don’t like product placement? Try an ice-cold Coca-Cola instead!
- Eminem is a rapper. M&M’s come in a wrapper. CONSPIRACY??
- Godot Divides by Zero
- Hello, I’m Erik Erikson and I have a silly name
- I love how Windows gets overly defensive when you try and move the location of the calculator
- I think Scooby Doo is in my pants
- In the beginning, Al Gore created http://
- It’s My Infinitive and I’ll Split It if I Want To!
- The Selfie of xXxDorainGray2000xXx
- Walk into the club like what up I got an infinite series
- When life gives you gators, make Gatorade
- Why doesn’t somebody buy Godot a watch?
- You say tomato, I say existential crisis
Favorite Tags
- “ENVIRO” IS NOT A WORD GODDAMMIT
- “stop bidding against me or I WILL INVADE YOU” is the fucking quote of the century don’t even argue with me
- (i’m not really a roomba i lied)
- *hand banana voice* “TNGHT…you.”
- ?!???!?!??!!?!?!
- at least my main man Leibniz is here for me
- australia u ok?
- blister party on toe 3 BYOB
- claudia bitches to the tubes
- claudia bitches about the tubes
- claudia bitches about the tubes to the tubes
- claudia goes on a date for the first time since the stone age
- dafuq do i tag this?
- dear god i hate twitter
- expressing anger in poem form is constructive right?
- friends don’t let friends purchase islands
- FROM BREADCRUMBS TO BUFF
- give us those flowers back you faker
- HAHA THOSE POOR SOGGY BASTARDS
- holy shit i used the “sports” tag
- i don’t get it gary (random spongebob reference for effect)
- i hate this goddamn font with all my soul
- i mean seriously how can not a single store in vancouver have bisquik
- I’m gonna sum some terms / only got an infinite number to figure / I’m I’m addin’ / don’t be lookin’ saddened / this is Maclaurin’s series (sung to the chorus of Macklemore’s “Thrift Shop”)
- I’ve used the “cap’n crunch” tag more than once?!
- let it go…let it go…it was fucking five years ago
- look at that worthless pie chart i mean seriously
- loop the loop take a poop
- MANLY SEAGULL IS MANLY
- mayans NO!
- OH GOD I HAVE TO TAG THIS?! poetry? is this poetry? i’m muthafuckin’ wordsworth
- OH WHAT IN THE HOT HOLY FUZZ FUCK IS THIS NOW
- revenge is a dish best served at 200 dB
- rise on the third day fungus jesus
- shit u dead son
- SUMMER DAYS DRIFTING AWAY TO OH OH THOSE SUMMER NIGHTS WELL-A-WELL-A-WELL-A HUH!
- SWIGGITY SWAG WHAT’S IN THE TAG?
- take that you damn fog
- the day we completely give up the ability to flush manually is the day we lose our dignity
- the state the state the state is on fire/we could really use some water
- what in the flying fuck of fucks
- yes i just used “penis costumes” as a tag what’re you gonna do about it?
- you and me baby ain’t nothin’ but aves so let’s do it on the porch until we make tons of babies (sung to the chorus of The Bloodhound Gang’s “The Bad Touch”)
Favorite Survey Responses
219.Have you ever seen The Exorcist?
Yeah, he lives down the block
Two Things You Want Very Badly At The Moment:
1. A Pulitzer Prize
2. A taco
1. Are you in a relationship?: With my Tests and Measurements class. Yes, we’re a couple now. Yes, I’m seeking therapy for this.
31. Would you be a pirate?
Do you have any idea how many “booty” jokes I would be making? I would be ordered to walk the plank within my first half hour.
2. Shorter than 5’3″?
Shut up! You don’t know me! You can’t judge me!
3. In your pajamas?
No, actually, I’m 5’4″ in my pajamas.
11. DO YOU HAVE INTENSELY ROMANTIC DREAMS INVOLVING JOHN PHILIP SOUSA?
How…how did you know?
When/where was the last photograph you took?
Monday, in the SUB, for my “official” summer custodian badge thingy. Like there are going to be random people bursting into the apartments we’re cleaning and demanding to see proof that we’re supposed to be cleaning them.
Dude, that would make work so much more interesting.
*BAM* “WHERE ARE YOUR PROOFS OF IDENTIFICATION, YOU GSR-CLEANING HOOLIGANS?”
Who would clean these stupid rooms for fun, anyway? “Hey, it’s some idle Tuesday afternoon, let’s go break into the GSR and clean it!”
Has anyone touched/smacked your butt?
It’s called Marching Band. Actually, it’s called Beau the Pervert, but it usually goes on during marching band, so I’m calling it that.
Are you happy with your life right now?
*makes farting noises with mouth*
Are you strong enough for this survey?
I AM JESUS
Do you put shampoo in your left or right hand?
I put it in my hair. Shampoo is for hair.
How do you feel about Diet Dr Pepper?
It makes me SO ANGRY
What is something silly you’ve kept for sentimental reasons?
My sanity.
318. If there was a god and you could ask him/her one question what would it be?
“Why is Jesus delusional about the moon?”
1804. Where do snowflakes come from?
God forgot to buy Head and Shoulders at Walmart last time he went.
1423. Are you jealous that dog can lick their own genitals?
Hahahahahaha.
If you could do that would you ever leave the house?
I think I would get sick of licking my genitals pretty quickly.
And that is probably one of the strangest sentences I’ve ever written.
1112. What rhymes with ‘orange’?
Stenographer.
7. how high is your sperm count?
Hopefully very, very, very low.
984. What do you think of the Insane Clown Posse?
Fuckin’ posses, how do they work?
737. Do you know how heavy things like airplanes stay in the air?
Fuckin’ aerodynamics, how do they work?
753. When Jesus saves souls…does he trade them in for valuable prizes?
It takes a metric ton of souls to trade in for a resurrection. That’s why it took him three days.
3322. Why does the cheese stand alone?
Because that’s just its whey.
3369. Can you mashed potatoe?
Only if I’m Dan Quayle.
2367. What is the official language of Australia?
Canadian.
2588. Winkin, Blinkin and Nod, one night, sailed off in a sea of dew…
They had a fight with potato guns, pew pew pew pew pew! (I don’t know).
2692. If you are making out with someone and you reach down and find they have a fish tail instead of legs do you still fool around with them?
How did I not notice this pre-makeout?
4721. Why are so many letters silent in French?
Why pick on French? Why can’t English make up its mind about how to pronounce stuff? Why doesn’t English get cool little letter accents like other languages. HOW DOES SOMEONE WITH PARASIGMATISM EXPLAIN THEIR SPEECH IMPEDIMENT?!
4347. What would you do if there were no limits?
Reach the asymptote. HA MATH JOKE
4121. Is there a book inside of you?
I EAT PAPERBACKS FOR BREAKFAST
4021. Write a poem right here in five minutes or less:
Roses are red
Violets are blue
Datum means one
Data means two.
3684. Why is jesus always pictured as white when he came from the middle east and was probably middle eastern?
Making him white makes him automatically tortilla-colored for easy burrito appearances.
19: Are you a vegetarian?
I EAT SOULS
53: How often do you forget to close your parentheses?
NEVER! (Well, almost never (ha you see what I did there (oh god it doesn’t stop (FOR THE LOVE OF JEEBUS MAKE IT STOP
X) Do you think you’re a good person?
I’m a toaster.
Z) What do you usually eat for breakfast?
Souls.
When your pet comes in the room, do you say hi or just ignore them?
Each cat gets about a five-minute greeting.
34. Could you forgive a cheater?
HAHAHA, I thought that read, “could you forgive a cheddar” and I was like NO, cheddar is the asshole of the cheese world. He will take your gouda day and ruin it in the worst whey.
Favorite scent?
The sound of one hand clapping.
41: What do you do when characters don’t follow the outline?
I HAVE NO OUTLINE. I AM GODBERRY: KING OF THE PLOT
24. What do you want God to say to you when you reach the pearly gates?
“Leibniz is sitting over there.”
37. if you had one wish, what would you wish for?
Leibniz. Alive, naked, and on my bed.
If you had the chance to travel back in time, would you?
Dude, you have no idea. Leibniz. Alive. Naked.
3731. What would make a cool coffee table book?
“1,001 Pictures of Naked Leibniz Doing Calculus”
4385. Name three highly specific things you look for in a potential mate?
Like, how specific is specific?
1. They wear a giant badass wig.
2. They invented calculus.
3. Their first name is Gottfried.
40: What historical figure would you like to have sex with?
Leibniz. INTEGRATION BY PARTS okay I’ll stop.
If you could steal one thing without consequence what would it be?
Probably something Leibniz-related. Like Leibniz. DON’T JUDGE ME.
If you could eat lunch with one famous person, who would it be?
LEIBNIZ I DON’T CARE THAT HE’S DEAD BRING ME HIS URN I’LL BUY IT A SANDWICH
16. What’s something you want to do that you’d be embarrassed to tell other people about?
I would make sweet, hot love to Gottfried Leibniz, 100% not kidding. HAHA OH WAIT I’M NOT EMBARRASSED TO TELL PEOPLE ABOUT THAT AT ALL.
That’s like how I start my conversations now.
“Hi, nice to meet you. I’m in love with a dead polymath and his incredible wig!”
Here’s to another decade of blogging!
Decade Statistics: Popular Posts and Weird Searches
Aloha, fools! Today’s Decade Statistics topics involve some of the weird ways people find my blog and which of my posts seem to be the most popular. These stats are going to be a bit skewed, ‘cause of my move over to WordPress from MySpace in 2010. But let’s just work with the WordPress data because MySpace is dead and nobody cares about pre-2010, anyway. Okay?
Ten Most Popular Posts on WordPress (2010 – 2016)
- Colored Beats!
- Multicollinearity: The Silent Killer
- Scrabble Letter Values and the QWERTY Keyboard
- The Periodic Table of Academic Disciplines
- TWSB: And here’s some eye surgery to creep you out for the rest of your life
- You’re the Na to my Cl
- Oh look, PayPal wants me to fill out a survey
- Gift of the Magikarp
- Adventures in R: Creating A Pseudo-CDF Plot for Binary Data
- Snow White and the Seven Dwarfs is like a bad drug trip
Weirdest Search Terms on WordPress (2010 – 2016)
- jokes about leibniz cookies
- costco underwear
- man with foot on stool playing tambourine pics
- steve torso
- boastful toast is the toast with the most to lose
- thomas m disch, toaster (I like to think that the “toaster” part is Disch’s title, like how people put “PhD” at the end of a name. “Thomas M. Disch, Toaster.” I like it.)
- hipster balloons
- third degree noodle trauma
- if your a noodle and you know it clap your hands
- can’t get chitty chitty bang bang songs out of my head
- chitty chitty bang bang rule 34 (INTERNET, NO)
- how big is 100 grams of maize porridge
- dopey’s butt
- limber up and let me know that i am santa english
- kgdlfhlo
- gdrydfjgki
- khkjhkhkjhkjh
- nnnnnnnnnnng0
- czzxc
- asdfgh
- daadadad
- ppppppppppppppppppppppppppppppppppppppppppppppp
Yeah.
Decade Statistics: Categories
Hello again! Today we’re going to be talking about my blog categories. There are a total of 35 of them, and they break down as follows:
Posts per category

Words per category

Average number of words per post, by category

The “Surveys” category has such a high average (and total) word count because of my doing the 5,000 question survey in increments of 100 questions at a time, haha.
I’ll also give you my favorite post in each category, because I’m that exciting.
Animals: Asp caterpillars, aka Donald Trump in caterpillar form.
Art: A Flash I did about Millard Fillmore. It’s horrifically bad, which makes it fantastic. (Seriously, it’s so freaking bad.)
Blogging: I justify why my blog is important to me.
Books: I buy a copy of The Brave Little Toaster (book version) and gush about its awesomeness.
Dreams: Big Advertising vs. the Unbranded Man meet in an epic Grand Canyon showdown.
Entertainment: Our 7th grade reading group’s interpretation of Dune.
Events: Pictures from downtown Vancouver during the 2010 winter Olympics!
Family: My ancestry composition according to 23andMe.
Food: Tukey Sandwiches. Because statisticians deserve more food items named after them. Also, puns.
Games: A brief rambling about Gordon Freeman.
Health: My genetics and health risk factors, according to 23andMe.
Humor: What if the Founding Fathers communicated via chatroom? This is still my favorite blog post.
Internet: Holly Carp is real.
Life: 2009 me writes a letter to 2006 me.
Math: I explain what it’s like to struggle with doing mental calculations.
Miscellaneous: I accidentally inhale a bee and suffer predicable consequences.
Music: I re-write MC Hammer lyrics to be about proofs. ‘Cause that’s what you do when you’ve got a 25 credit semester to deal with.
News: Vancouver sucks.
People: A post about Leibniz. Shocking, huh?
Philosophy: I talk about why I think polymathy isn’t a thing that happens anymore.
Plans: What I would do if I won the lottery.
Quizzes: I discuss an in-depth aptitude test I took in 2005.
Rants: I spiral into a rage-induced rant triggered by Google.
Relationships: A blog about sex and a thing that happened to me once. [this used to be private, but I made it public because I think it’s important.]
School: What I learned during my first round of undergrad.
Science: The stability of a stool is analogous to the “stability” of a structural equation model.
Shopping: How many iPods can I buy?
Social: Sean ponders the purchase of an island.
Sports: The inanity of basketball team names.
Statistics: Nate and I play around with the standard deviation.
Surveys: I lie a lot.
Technology: Claudia vs. Apple stores.
Travel: Bad directions and big trees.
Work: Teaching intro stats to non-stats people is important to me.
Writing: An essay on concurrent discoveries throughout history, focusing mainly on calculus.
Decade Statistics: Totals and Words
Hello, everyone! So today I’m going to be talking about totals and word counts and whatnot. So let’s do it!
Total number of blog posts: 3,653
Total words: 952,384
Total number of images: 1,839
Total number of videos: 603
Total number of private blog posts: 218
Cumulative sums!




Word counts per blog year, month, day of the week, and (why not) day of the month:




And, just for fun, a word cloud of my titles.

YAY!
Decade Statistics: Timeline and Milestones
Hey, guys!
So in honor of my decade of blogging, this week will be all about blog stats and such. I figured the best way to start off would be to go through each blogging year and make note of the “highlights” of the past decade. So here you go!
Year 1 (May 2006 – April 2007)
- Started blogging (duh)
- Graduated high school
- Took a cruise to Alaska
- Got my wisdom teeth removed
- Attended band camp for the U of I marching band
- Met two of my best college friends: Matt and Maggie
- Started college
- Met Sean
- Joined Facebook
- The Butt Song made its debut
- A (really crappy) play I wrote was performed in my theatre class
- I took Literature in Western Civilization II and realized that I wanted to study philosophy in more detail
Year 2 (May 2007 – April 2008)
- Went to a drag show, in drag, with Matt
- Started dating Matt at said drag show
- Got hired at my first part-time job: Wendy’s
- I took Tests and Measurements (PSYC 453) and realized that psychometrics was the area of psychology that interested me the most
- The 25-credit semester
- I spent most nights talking to Sean on MSN Messenger, usually until at least 1 AM
- Discovered Leibniz
- First date with Rob and all the subsequent Rob/Jessica drama that entailed
Year 3 (May 2008 – April 2009)
- Worked at the U of I as a summer custodian
- Discovered Metalocalypse
- Moved into the house with Sean, Aaron, Lanky, and Michael
- So much Rock Band
- Got my industrial ear piercing
- Broke up with Rob and dealt with all the drama that entailed
- Got to march a halftime show for the Seattle Seahawks
- Started dating Aaron
- Went to Hawaii with the band
- Went parasailing in Hawaii
- Got my B.S. in psychology
- Got accepted into UBC’s psychology graduate program
- Turned 21
Year 4 (May 2009 – April 2010)
- Got my B.S. in philosophy
- “Broke up” with Aaron (I use quotes because it was the most mutual, amicable break up there could ever be)
- Worked as an in-home caretaker for Seubert’s
- Took another cruise to Alaska
- I…did stuff. This is still private, but it’s worth mentioning because it’s important to me and I think at least one of you knows what I’m talking about
- Moved out of the house with the guys
- Moved to Vancouver
- Started grad school
- Realized my supervisor and I were not the most compatible of people
- Lots and lots of misery
- Lots and lots of rain
- NO REALLY IT RAINED THE WHOLE GODDAMN MONTH OF NOVEMBER I AM NOT EXAGGERATING I KNOW THIS REALLY ISN’T A BIG DEAL IN THE GRAND SCHEME OF THINGS BUT I MEAN SERIOUSLY WHAT IN THE SOGGY FUCK, VANCOUVER
- Won NaNoWriMo 2009
- Started downloading a new song per day
- The 2010 Olympics came to Vancouver. I walked around downtown and got to see the Olympic torch
Year 5 (May 2010 – April 2011)
- Moved to a new apartment in Vancouver
- Went to Boston for the APS conference
- Moved my blog from MySpace to WordPress
- Started walking for pleasure
- Won NaNoWriMo 2010
- Decided not to continue on to the PhD program at UBC
- Got accepted into the philosophy graduate program at UWO
- Went skydiving
- Thesis drama
- Was hospitalized for…reasons
- Ran a 10K (Vancouver Sun Run)
Year 6 (May 2011 – April 2012)
- I got really sick, both mentally and physically
- Was hospitalized again for…different reasons
- Successfully defended my thesis
- Got my M.A. in psychology
- Moved back to Moscow
- Took ANOTHER cruise to Alaska
- Saw Mount Rushmore
- Moved to London, Ontario
- Started grad school (again)
- Quit grad school (again) and moved back to Moscow
- Won NaNoWriMo 2011
- Moved to Marana, AZ to be with my mom
- Moved to Tucson, AZ with my mom
- Started working at Pima Community College as a Disabled Student Resources tech
Year 7 (May 2012 – April 2013)
- Moved back to Moscow
- Started working as a lecturer for the UI stats department
- Went back to undergrad
- Won NaNoWriMo 2012
- Worked as a data analyst for the Ag Department
Year 8 (May 2013 – April 2014)
- Had what was probably my most enjoyable semester at UI
- Walked 1,361.2 miles in 2013
- Got accepted into the University of Calgary’s statistics graduate program
Year 9 (May 2014 – April 2015)
- Got my B.S. in math
- Had to unexpectedly choose between University of Calgary and Carleton University for grad school
- Chose the University of Calgary and moved up there
- Met Nate and subsequently fell head over heels for him
- Won NaNoWriMo 2014
- Won a TA award for fall 2014
Year 10 (May 2015 – April 2016)
- Saw some of the oldest/biggest trees on the planet in the Grove of Titans in Jedediah State Park
- Went to my first MLB game and saw the Giants play the Braves at AT&T Park in San Francisco
- Saw the Grand Canyon for the first time
- Visited Yellowstone National Park
- Moved in with Nate
- Adopted Jazzy Cat
- Nate and I got engaged
- Walked 2,523.29 miles in 2015
- Won a TA award for fall 2015
- PhD program drama
- Blogged for 10 years straight!
Man, a lot of stuff can happen in a decade. Writing it all out like this makes it seem like I’ve really become a completely different person from the person I was when I first started this blog. Pretty snazzy, if you ask me.
10 Years of Eigenblogging
Hello, everyone!
So today is kind of a big deal for me. Ten years ago, on May 1, 2006, I gave in to peer pressure and started this blog with the intent of posting every day. Because it was 2006, this blog was started on MySpace and was basically just me rambling about my daily activities.
Since then, however, my blog has grown up a little bit, gotten its own domain name, and has become a little archive of my life since 2006, with a post for every day of every year since the blog was started.
So I figured it’s appropriate to acknowledge that today is my 10 year anniversary of blogging! Yup, believe it or not, there’s been a decade of this nonsense.
This coming week will be all about blog statistics and looking back on the past 10 years to see what’s changed for me (and what’s stayed the same). So that’s something to look forward to!
As always, I appreciate everyone who reads this (subscribers and passers-by), and I hope I’ve kept you entertained enough so that you’ll want to keep reading long into the next decade of my blatherings.
Woo!
Week 18: The Siegel-Tukey Test for Equal Variability
Today we’re going to talk about another nonparametric test: the Siegel-Tukey test for equal variability!
When Would You Use It?
The Siegel-Tukey test for equal variability is a nonparametric test used to determine if two independent samples represent two populations with different variances.
What Type of Data?
The Siegel-Tukey test for equal variability requires ordinal data.
Test Assumptions
- Each sample is a simple random sample from the population it represents.
- The two samples are independent.
- The underlying distributions of the samples have equal medians.
Test Process
Step 1: Formulate the null and alternative hypotheses. The null hypothesis claims that the two population variances are equal. The alternative hypothesis claims otherwise (one variance is greater than the other, or that they are simply not equal).
[Note that from here on out, the calculations are exactly the same as for the Mann-Whitney U test. The only thing that differs is how the data are ranked.]
Step 2: Compute the test statistics: U1 and U2. Since this is best done with data, please see the example shown below to see how this is done.
Step 3: Obtain the critical value. Unlike most of the tests we’ve done so far, you don’t get a precise p-value when computing the results here. Rather, you calculate your U values and then compare them to a specific value. This is done using a table (such as the one here). Find the number at the intersection of your sample sizes for both samples at the specified alpha-level. Compare this value with the smaller of your U1 and U2 values.
Step 4: Determine the conclusion. If your test statistic is equal to or less than the table value, reject the null hypothesis. If your test statistic is greater than the table value, fail to reject the null (that is, claim that the variances are equal in the population).
Example
Today’s data come from my 2012 music selection. I wanted to see if the median play counts for two genres—pop and electronic—were the same. I chose these two because I think most of my favorite songs are of one of the two genres. To keep things relatively simple for the example, I sampled n = 8 electronic songs and n = 8 pop songs. Set α = 0.05.
H0: σ2pop = σ2electronic
Ha: σ2pop ≠ σ2electronic
The following table shows several different columns of information. I will explain the columns below.

Column 1 is the genre of each song.
Column 2 is the play count for each song, ranked from least to greatest
Column 3 is the rank of each play count. In order to obtain the ranks for this test, start by giving a rank of “1” to the lowest play count value. Then a rank of “2” to the highest play count value, a rank of “3” to the second highest play count value, a rank of “4” to the second lowest play count value, etc. (that is, assign ranks by alternating from one extreme to the other).
To compute U1 and U2, use the following equations:

So here,

The test statistic itself is the smaller of the above values; in this case, they’re both the same, so we get U = 32. In the table, the critical value for n1 = 8 and n2 = 8 and α = 0.05 for a two-tailed test is 13. Since U > 13, we fail to reject the null and retain the claim that the population variances are equal.
Example in R
No R example this week; most of this is easy enough to do by hand for a small-ish sample.
Book Review: Watership Down (Adams)
It’s time for some Watership Down!
Have I read this before: Yes, the summer after high school. However, I read it while I was recovering from having my wisdom teeth yanked out, so I was kind of loopy and don’t remember much.
Review: This is a fantastic book, yo. In case you’ve never read it (or know nothing about it), it’s about rabbits. I love the way Adams writes the rabbits. It’s very natural—you get their behaviors and attitudes and fear. And it’s basically impossible to not sympathize with them as they go through their troubles. If you’ve never read this, read it. If you’ve read it, read it again.
Favorite part: This is going to sound weird, but my favorite part is the epilogue. I love the way it’s written and I love how it gives us closure with Hazel. I think it’s very beautiful and I remember it making me cry when I first read this. But I was on drugs then.
Rating: 8/10
AP
Yo, fools!
Awhile back (2011), I decided to try taking an online practice version of the AP Statistics exam. I think it went okay (I unfortunately didn’t record my exact final score on the multiple choice, ‘cause I’m a loser), but I decided to try it again because, you know, I’ve actually got a better background for it now.
Well, not the same practice test. I found a newer one (2010 I think?) on which there were fewer multiple choice questions but the questions were decidedly more difficult. This time I ended up getting 16/18 correct (I shouldn’t have missed one of the ones I did; I just completely blanked on how to do it, even though I’ve taught it in lab like 20 times).
Anyway. If you want to give it a shot, it’s located here!
TumblrDump
Hello, fellow humans!
Have some Tumblr crap, ‘cause I’m like in the weeks between “school panic” and “relaxing with my mom” right now, so not much is going on.
Except “I’m in the weeks between “school panic” and “relaxing with my mom” right now” panic.
Anyway.
Chrome extensions for disabilities
Freaking Idaho.

Oh, Gavin.
I miss Ray!
Freaking Walk the Moon, Man
I am seriously addicted to this song. This is the fastest a song has been promoted to a Five Star in a long time.
Week 17: The Moses Test for Equal Variability
Today we’re going to talk about another nonparametric test: the Moses Test for equal variability!
When Would You Use It?
The Moses Test for equal variability is a nonparametric test used to determine if two independent samples represent two populations with different variances.
What Type of Data?
The Moses Test for equal variability requires ordinal data.
Test Assumptions
- Each sample is a simple random sample from the population it represents.
- The two samples are independent.
Test Process
Step 1: Formulate the null and alternative hypotheses. The null hypothesis claims that the two population variances are equal. The alternative hypothesis claims otherwise (one variance is greater than the other, or that they are simply not equal).
Step 2: Compute the test statistics: U1 and U2. Since this is best done with data, please see the example shown below to see how this is done. [Note that the test statistic calculations are exactly the same as for the Mann-Whitney U test. The only thing that differs is the ranking procedure.]
Step 3: Obtain the critical value. Unlike most of the tests we’ve done so far, you don’t get a precise p-value when computing the results here. Rather, you calculate your U values and then compare them to a specific value. This is done using a table (such as the one here). Find the number at the intersection of your sample sizes for both samples at the specified alpha-level. Compare this value with the smaller of your U1 and U2 values.
Step 4: Determine the conclusion. If your test statistic is equal to or less than the table value, reject the null hypothesis. If your test statistic is greater than the table value, fail to reject the null (that is, claim that the variances are equal in the population).
Example
Today’s data come from my 2012 music selection (I’ll use this data next week, too!). I wanted to see if the median play counts for two genres—pop and electronic—were the same. I chose these two because I think most of my favorite songs are of one of the two genres. To keep things relatively simple for the example, I sampled n = 8 electronic songs and n = 8 pop songs. Set α = 0.05.
H0: σ2pop = σ2electronic
Ha: σ2pop ≠ σ2electronic
Here are the raw data:

The following tables show several different columns of information. I will explain the columns below.

The “Subsample” column: to obtain the rankings for this test, first divide the n1 scores in sample 1 into m1 subsamples (m1 > 1), with each subsample comprised of k scores. Then divide the n2 scores of sample 2 into m2 subsamples (m2 >2), with each subsample comprised of k scores. To form the subsamples, employ sampling without replacement within each of the samples. Ideally, m1, m2, and k should be chosen such that (m1)(k) = n1 and (m2)(k) = n2 if at all possible. Here, m1 = m2 = 4, and k = 2. The “subsample” columns list the four subsamples of play counts for each genre.
The second column contains the average of the k values for a given subset. It’s just the average of the values in the “subsample” column.
The third column contains the differences between each subsample value (X) and the subsample’s mean.
The fourth column is just the third column’s values squared.
The fifth column contains the sum of the values in the fourth column.
The sixth column contains the rank of the value in the fifth column over both genres. The smallest values is ranked as 1 and the largest is ranked as 8 (in this case).
To compute U1 and U2, use the following equations:

So here,

The test statistic itself is the smaller of the above values, so we get U = 81. In the table, the critical value for n1 = 8 and n2 = 8 and α = 0.05 for a two-tailed test is 13. Since U > 13, we fail to reject the null and retain the claim that the population variances are equal.
Example in R
x=read.table('clipboard', header=T) #data
attach(x)
elects=subset(x,genre=="Electronic")
pops=subset(x,genre=="Pop")
group1=matrix(rep(NaN,8),nrow=4)
group2=matrix(rep(NaN,8),nrow=4)
group1=as.matrix(sample(elects[,2],8,replace=F)) #subgroups for sample 1
sub1.1=group1[1:2,]
sub1.2=group1[3:4,]
sub1.3=group1[5:6,]
sub1.4=group1[7:8,]
group2=as.matrix(sample(pops[,2],8,replace=F)) #subgroups for sample 1
sub2.1=group2[1:2,]
sub2.2=group2[3:4,]
sub2.3=group2[5:6,]
sub2.4=group2[7:8,]
samps=rbind(sub1.1,sub1.2,sub1.3,sub1.4,sub2.1,sub2.2,sub2.3,sub2.4)
xbars=rep(NaN,8) #column 2
for(i in 1:8){
xbars[i]=mean(samps[i,])}
xbars=as.matrix(xbars)
diffs1=rep(NaN,8) #column 3
for(i in 1:8){
diffs1[i]=(samps[i,1]-xbars[i])}
diffs2=rep(NaN,8)
for(i in 1:8){
diffs2[i]=(samps[i,2]-xbars[i])}
diffs=cbind(diffs1,diffs2) #column 4
diffs2=diffs^2 #column 5
sumdif=rep(NaN,8)
for(i in 1:8){
sumdif[i]=diffs2[i,1]+diffs2[i,2]} #column 6
Calculus is God
Today I had to go invigilate a MATH 277 final as part of my TA requirements (we each have to invigilate/proctor two final exams; sometimes we get ones we’ve actually been TAs for and sometimes we don’t. This was a case of the latter). It turns out that MATT 277 is University of Calgary’s version of MATH 275, or multivariate calculus. The test involved about 20 or so questions.
Our job as TAs, apart from making everybody sign in on the little attendance sheet, was mainly to just walk around in order to discourage cheating and to help anybody out who raised their hand.
So let me just quickly set the scene for you: a large gym full of 250+ students, a 2-hour exam, and lots and lots of calculus.
I bet you can guess what I was thinking about.
I was thinking about Leibniz!
I was wondering, as I walked down the aisles of seats, watching students write the elongated “s” for integration and the dx/dy (or variations of that) for differentiation, what Leibniz would think if he saw a roomful of people, in 2016, still using some of his original symbols. Like, how ridiculous is that? Calculus has been studied, expanded upon, and extended to a ton of different fields/uses since it was first developed, but we’re still using some of Leibniz’ original symbols.
And what would he think about calculus being taught as basically standard curriculum at universities? What would he think about the tons of different uses of calculus today?
I know I kind of talked about this in a previous post, but I actually think about this quite a bit. Especially today.
Yay calculus! Yay Leibniz!
Whaaaaaaaaaat
Holy crap, I did waaaaay better on that STAT 723 final than I thought I did. He must have curved it.
But anyway, that was the last final I’ll ever have to take for the last class I’ll ever have to take.
…
I say that, but then again, I’ve said that several times since 2008, so…
Consequences
Hello, reader(s)! So this is going to be the TMI posts of all TMI posts (at least until I post the thing I plan on posting sometime this summer), so if you don’t want to read about my nasty-ass body, feel free to skip this.
ANYWAY.
I’m very close to hitting 1,000 walking miles for the year (it should happen either the last week of April or the first week of May, if all goes well). Since I take approximately two days off from walking per week (one of the weekend days, and my “I’m a slug, deal with it” Fridays), that means I walk approximately 11 to 12 miles five days a week. Some weeks it’s more, some weeks it’s less, but on average, I’d say approximately 12 per day. Here’s some of the weird shit that this walking regimen has done to my body:
- Two of my toenails are completely black. Like, always. I think there’s blood under the nail from them being pushed against the insides of my shoes. This is, however, most likely due to the fact that I had to revert to Kinvara 5s when I
murdered without remorsewore out my Kinvara 6s. I wore an 8 in the 6s and went back to a 7.5 in the 5s; I think my feet had gotten used to a little more room. - My big toes’ toenails, on the other hand, are shiny enough to be used to signal a passing plane from a remote island. I think my socks are polishing them.
- My calf muscles are super visible when I flex them. It makes me very happy.
- My knee-high socks do not appreciate my calves, though.
- After my longer walks (15+ miles) or walks when I’m carrying groceries home (12 miles, 20+ pounds or so in my backpack?) I’ve started getting hematuria. Apparently it’s fairly common with strenuous and/or long bouts of exercise (and particularly for runners) and not too big of a deal. Which is good, ‘cause it scared the hell out of me at first. It also goes away within about 5 hours.
- I have the most godawful tan pattern going on, especially on my arms. It’s mainly on my left arm, ‘cause I wear my extra hairbands and Fitbit on that arm, but all of them have been worn for different amounts of time, so my skin’s in like 30 different shades on my left arm. It’s weird. I’m going to look awful at my wedding; I should get a long-sleeved dress.
