Does Microsoft Excel know more about Nicki Minaj than I do?

For a bit of a laugh, I frequently challenge my friends to topics on Quiz-up that I know we both know literally know nothing about. My main topic of choice used to be “Nicki Minaj” but recently I suspect that my younger brother is secretly studying Minaj facts so he can beat me at it.* Anyway, there have been a couple of times I’ve scored so badly in these joke Quizup games I’ve wondered:

Would I actually just been better off jabbing at the screen at random?

What is QuizUp?

Quiz-up, for the uninitiated, is an app available on both apple and android that allows two players (either a friend you challenge or a stranger on the internet) to go head to head on a quiz. There are a wide range of topics from Roman history; the aforementioned Trinidadian pop-star; Simpsons quotes, Cricket trivia and many more. It asks you a question, you get a few seconds reading time, and then 4 multiple choice answers appear and you press which one you think is the answer. QuizUp-Masthead-Final

What Quizup looks like. Also apparently what someone who knows very little about art looks like.

How the scoring works

There are 7 questions, and the scoring system is heavily dependent on the time taken to answer. You have 10 seconds to answer the question, if you get the right answer you get 10 points, and then you get the time remaining on the clock (rounded-up) added to your score. So if you answer right within the first second, you’d get 20 points (10 for the right answer, 10 for the time). If you get the right answer four seconds in, you’d get 16 points (10 for the right answer, 6 for the time remaining).

Speed is a major element of the game: If you get 4/5 questions right in under a second; you’ll score as much as a more deliberate player who got all 5 right, but took 4 seconds to answer each one.

 

And finally, one aspect that comes into play later, getting the final answer right gets you double points.

After spending a long time deliberating on every question on a Nicki Minaj quiz to then score 20 points over-all I’ve wondered if I would’ve been better jabbing the screen at random the first time the answers showed up.

More specifically, I wanted to know what score was the point where, if you scored lower than it,  you were no better off than just jabbing wildly at the screen for the whole game.

Unfortunately I’m terrible at maths

I’ve spent a lot of time in a chemistry lab dissolving my brain. As a result I’ve forgotten most university level statistics that I’ve ever learnt.

Whilst working out the expected value of 7 mutually exclusive events isn’t difficult, the fact that the final answer is worth double points made the calculations a lot more complicated, far beyond the level I could manage in the blank space of an advert in the Evening Standard on the bus home. **

Being a nerd, however, I was determined to find out what sort of score you can expect just by jabbing wildly at your screen. So I decided to do what any normal person would do in this situation. I got my computer to play “Quizup” 355,812 times:

Method

So I didn’t actually get it to play proper Quizup, that would’ve taken a while. I’m also not very good at coding, and I don’t think Plain Vanilla — the company behind Quizup — would’ve liked me very much if I’d just flooded their system with my laptop guessing randomly.

Instead I made a unique Quizup game just for my computer called “Guess a Number Between 1 and 4”.  Not particularly thrilling, but my laptop didn’t seem to mind.

Each question was the same, it was “I’m thinking of a number between 1 & 4, what is it?” The answers, which I got using Excel’s random number generator, were 2, 3, 4, 3, 1, 1 and 1, respectively.

Then, I copied that row to the next row, giving me another row of 7 random numbers between 1 and 4. Excitingly, my computer had guessed the answer to question 1 and question 7 correctly. Well done computer!*** It had scored 60 points on it’s first go at “Guess a Number between 1 and 4”.

Seeing that this was going to work quite nicely, I then decided to repeat the process :

qu raw 1

A lot of times:

qu raw 2

There was no real logical reason as to why I did it 355,812 times, other than my hand sort of got tired scrolling all the way down. Also doing just under 2.5 million random number calculations really made my computer slow so I didn’t make it do any more.

The next thing to do was work out the score the computer got for each go, which I did in the next set of 7 columns with

=if(a4=a$2, 20, 0)

which means that if the answer in a specific cell was right, the computer got gave itself 20 points, if not it got 0 points. For question 7, the code was changed slightly to

=if(g4=g$4, 40, 0) 

to make it so that if it got the final question right, it gave itself double points. The final column then summed up the total score for that game.

This final column on the right was the most important, and the one I did all the analysis on.

RESULTS

Here is the number of times that the computer scored each of the possible scores:

Score
Number
Probability
0 47,626 13.39%
20 94,269 26.49%
40 95,277 26.78%
60 66,951 18.82%
80 35,294 9.92%
100 12,906 3.63%
120 3,081 0.87%
140 382 0.11%
160 26 0.01%

And here it is as a sexy graph:

Score

A simple answer to my question of “Is my score of 20 in Nicki Minaj worse than just stabbing wildly at the screen” is

Yes.

We can calculate the average score my computer gets by multiplying each score by the number of times it happened, summing all those together, and dividing by the total number of games played.

In this instance it gives us a score of 40.06 so on average if i were to just stab at my screen I would be more likely to score more than what I did.

For a more nuanced look at this we can consider the cumulative probability, shown below in another less sexy graph.

qucum

There’s an 86% chance that just by random guessing it’s possible to get a score of  at least 20, i.e you’d have to be really unlucky not to. Importantly, 60% of the time it’s possible to get at least 40 points by guessing all the answers.

Conclusion

If you score less than 40 on a quiz-up game, you were better off not reading the questions  and just trying to answer as quickly as possible.

I’m not sure how this will affect my game-play in the future, Maybe I’ll just steer clear of Nicki from now on.

nikki minaj

Footnotes

*It is entirely feasible that my brother has in fact been a massive Nicki Minaj fan all along, and deliberately lost the first few games to throw me off

** If this is actually very easy to show algebraically and I’m just being silly, please let me know.

*** As fans of Quizup will know, you gain experience each time you complete a quiz. You get the score from the round, a 40 point bonus for completing the game, and a 100 point victory bonus if you win and a 50 point victory bonus if you draw. These points then add up to give you “levels” in the topic (for example, I am currently level 23 in General Knowledge, level 15 in Chemistry and level 2 in Nicki Minaj)

According to wikipedia: “the total points required to reach level n after first starting it is 35n2+95n-130.” If in this game we assume that 40 is a draw, and add up all the points my computer has got from playing “Guess the number between 1 and 4” we discover that it has 45,115,330 experience points! Which would give it a level of 1,134. I have no idea what to make of this fact.

Advertisements

One Reply to “Does Microsoft Excel know more about Nicki Minaj than I do?”

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s