RWORD – TECHNICAL BLOG

Get the Rhema’s Word on the vast world of technology!

Archive for the ‘Educational’ Category

Statistics: The card game “war”

without comments

I wrote a Perl script that simulates a game of war.  As I remember playing it, the game goes like this:  Both players receive 26 cards randomly.  Both players play a card off of the top of their deck at the same time.  The highest card wins and takes all of the cards.  I say all of the cards because if both players play the same card (suit is irrelevant) at the same time, then they go into WAR.  Each player player discards three cards and then each play a card.  From there the players each play a card and there is either a winner or another WAR continues.  Thus it is possible to have many cards won in one round.

When playing this game as a kid, I realized that it had the possibility of going on and on and on for many turns.  But how many turn?  Yay numbers!  The Perl script that I used is at the end of this article (I know it’s *sniff verbose).

More interesting to me is the distribution of the length of the game (I measured it in number of won rounds).

Here is a graph from excel.   There are 1000 samples.  The numbers on the x-axis represent the duration of a simulation in number of rounds.  The y-axis represents frequency.   Thus there are more games of war that end in 100-150 rounds than any other interval in this graph.

Read the rest of this entry »

Written by rhemalinder

March 20, 2009 at 2:42 pm

Posted in Statistics, experiment

Tagged with , , , , ,

Balloon Wars Racing Cart

without comments

GIVE ME MONEY!

I LIKE MONEY!!!

This Christmas, my little brother Ransom wanted me to make him a game that he designed. He is 10 years old. Surprisingly, he had it well planned out with reasonable requirements. As part of his present, he wanted a way for people to buy this off of the internet. I reasoned with him a little bit and he agreed to ask for donations instead.

Level 3 - Screenshot

Level 3 - Screenshot

Level 2 - Screenshot

Level 2 - Screenshot

So here is the donate link:

1/2 will go to me and 1/2 to my brother that made all of the skins and models.

Here is the download link.

I went ahead and put this on FreewareFiles.com. It has 50 as of 2 days after this post…

Written by rhemalinder

March 5, 2009 at 11:56 pm

Posted in Educational

Tagged with , , , ,

14 Percent of YouTube Audio Taken Away By WMG?

with 17 comments

I stumbled on a YouTube video with the alert: “This video contains an audio track that has not been authorized by WMG. The audio has been disabled.”

After I saw that, I wondered just how many YouTube videos had the same thing happen.  So I did some googleing to try to find out.  First, I searched:

GoogleSearch: “This video contains an audio track that has not been authorized by WMG. The audio has been disabled.” site:youtube.com

This returned 260,000 results.  Keep in mind that the almighty Google search engine does not index every website, nor, I suppose, YouTube video.

Next, I searched for something that I think brings up all YouTube videos:

GoogleSearch: site:youtube.com “Video Responses:”  “Text Comments:”

This returned 1,760,000 results.

If we assume that all videos are indexed randomly, then we can take the WMG audio killed videos (260,000) over the total videos (1,760,000) and get a proportion of WMG audio take down videos.  This is roughly 14 percent.

This means that 14% of YouTube videos have no audio because of a WMG audio take down.

What do you think?  Does this surprise you?  Is my reasoning sound?

Written by rhemalinder

January 28, 2009 at 10:00 am

Proof! Bananas! Statistics!

with 2 comments

When a company or researcher needs to distinguish two treatments, products, or anything else, they use statistical processes to get conclusive results. One of the statistical tests that is the most useful is the ANOVA test. The ANOVA test can find statistical difference between multiple samples.

As part of my Statistical Quality Assurance and Experimental Design class, I had to do an experiment and analysis. I chose to look at banana decay. I wanted to see if bananas left on the counter lasted longer than bananas in the refrigerator. It turns out that the banana’s left in the fridge (Treatment 2) last the longest. Note the picture:Bananas After Experiment

After finishing the experiment, I was sure that the bananas from the fridge were the least decayed; but could I prove that statistically? Once I ran all of the numbers on the bananas, I could. You can read the Banana Project Report for details where the ANOVA test proves that bananas kept in the fridge last longer. Here is a graph of my results:

I can post more later, but you get an idea about how things went. It took 20 hours to turn all of my pictures into data… It became a little tiresome.

Written by rhemalinder

April 5, 2008 at 3:04 pm

Impress Your Friends With Some Statistics

without comments

Have you ever had a professor or a boss give you an assignment that could not be done in a reasonable amount of time? Wouldn’t it be great to be able to say that you have some statistical proof that it would take an unreasonable amount of time? Well I developed a quick and dirty method to calculate how long a task will probably take based on past experience. All you need to know is a little simple math and have access to a spreadsheet program such as Google-Documents.
First, pick the task that you want to track. How you do this is up to you. Do you want to measure how long it takes you to read a chapter, read a page, finish a whole book, or do one homework assignment? It’s up to you. Be aware that a highly related task will be the easiest to predict (don’t put reading a children’s book and reading a Milton book in the same category). I am picking the amount of time it takes me to read a Modern Global History chapter. My first four chapters took 1.1, 1.5, 1.75, 1.25 hours to read, respectively.

So enter these numbers in Google documents (Excel or even a calculator would work fine too). Also, add the labels for mean, standard deviation, and our prediction min and max.

Next we will calculate the mean and standard deviation for these numbers. Click on the cell beside “Mean” and type “=AVERAGE(A:A)” and press enter. You can find functions like this by clicking on the “Formulas” tab and selecting more (there are quite a few things to choose from). By putting “A:A” in the AVERAGE function we can add as many numbers as we want to the column A and it will compute a new average. Click on the cell next to Standard Deviation and type “STDEV(A:A)” and press enter.
Now we can computer our min (average – standard deviation) and max (average + standard deviation). Since we have the appropriate cell selected, type “=” then click on the mean (in this case 1.4), type “-” and click on the standard deviation (in this case 0.2857…) and press enter. Repeat the same for the max but use a “+” instead. This is what we get:


So in conclusion, for this example, I can expect to spend between 1.1 and 1.7 hours on reading a chapter for my Modern Global History class. Of course, the more data you have, the more accurate you can predict.

Written by rhemalinder

March 24, 2008 at 8:52 am

First Post

with one comment

Hello all!
Now that I have come to realization technical blogs are good, I have made one! I will soon have some work that I have done, am doing, and have yet to do. Enjoy the soon to come spectrum of goodness! In the mean time, have a look at my current project for statistical quality assurance. My professor did not ask for it, but I was inspired by my Software-Engineering professor to make an SRS for it.

Written by rhemalinder

March 22, 2008 at 10:00 pm

Posted in Statistics, homeowrk

Tagged with , , , ,