What are People Looking For in White Noise Recordings?

The white noise recording below has nearly 4 million views. But why is “Rain in the Woods Sleep Sounds” so much better than “Rain Showers” (55k views) or “Rain & Thunder Camping” (318k views)? All three recordings came out within a couple of months of one another and are from the same YouTube channel. Doesn’t “Spring Rain with Birds” sound nice? Yet it has only 417k views despite being released two years before “Rain in the Woods Sleep Sounds.”

More confusingly 7% of votes on “Rain in the Woods Sleep Sounds” are a thumbs down. Not a large percentage, but should it not be 0%? What are you expecting to hear when you click on “Rain in the Woods Sleep Sounds”? Give it a listen. I promise that you will think it sounds exactly like rain in the woods. Thumbs up from me.

Trust and the Blockchain

Automation of trust is illusory.

That is the thesis form this Aeon piece on the failure of Ethereum, a popular blockchain. There are many other points of interest.

How about this question:

Why are people so eager to put their faith in blockchain technology and its human supporters, instead of in other social and economic organisations?

Or this:

What it really exposed was the extent to which trust defines what it is to be human. Trust is about more than making sure I get my orange juice on time. Trust is what makes all relationships meaningful. Yes, we get burned by people we rely on, and this makes us disinclined to trust others. But when our faith is rewarded, it helps us forge closer relationships with others, be they our business partners or BFFs. Risk is a critical component to this bonding process. In a risk-free world, we wouldn’t find anything resembling intimacy, friendship, solidarity or alliance, because nothing would be at stake.

A Quick Little Proof

Prove that mn is odd if and only if both m and n are odd. We can write this in mathamatical notation as mn \in \mathbb O \Longleftrightarrow m,n \in \mathbb O

Let’s first prove that if both m and n are odd then their product is odd. An odd number is of the form two times and integer plus one. So let m = 2r + 1 and 2q + 1 . Then mn = (2r + 1)(2q  + 1) = 4rq + 2r  + 2q + 1 = 2(2rq + r + q) + 1 . Which is odd, by definition, it’s two time an integer — in this case the integer is 2(2rq + r + q)  — plus one.

Now we have to prove things in the other direction. If mn is odd then so are both m and n . Let’s do a proof by contradiction. We must assume that either m or n is even and then prove that mn is even. Assume m is even. Then mn = (2r)(2q  + 1) = 4rq + 2r = 2(2rq + r), which is even. The same holds if n is even. We’ve completed our proof by contradiction and so have proven our original statement.

Kenneth Arrow – The Polymath

The great economist Kenneth Arrow has passed away and the New York Times had a wonderful story about him in their obituary.

Professor Arrow was widely hailed as a polymath, possessing prodigious knowledge of subjects far removed from economics. Eric Maskin, a Harvard economist and fellow Nobel winner, told of a good-natured conspiracy waged by junior faculty to get the better of Professor Arrow, even if artificially. They all agreed to study the breeding habits of gray whales — a suitably abstruse topic — and gathered at an appointed date at a place where Professor Arrow would be sure to visit.

When, as expected, he showed up, they were talking out loud about the theory by a marine biologist — last name, Turner — which purported to explain how gray whales found the same breeding spot year after year. As Professor Maskin recounted the story, “Ken was silent,” and his junior colleagues amused themselves that they had for once bested their formidable professor.

Well, not so fast.

Before leaving, Professor Arrow muttered, “But I thought that Turner’s theory was entirely discredited by Spencer, who showed that the hypothesized homing mechanism couldn’t possibly work.”

A Quick Little Proof

Let’s prove that \sqrt{3} is irrational. An irrational number is one that cannot be written in the form \frac{a}{b} , where a and b are both integers; in other words there is no repeating pattern in it’s decimal.

First, let’s prove that if n^2 is a multiple of 3 then so is n . Assume that n is not a multiple of 3 . Then n can be written as: n = 3m + \ell where \ell \in \{1,2\} . Then n^2 = 9m^2 + 6m\ell + \ell^2 . We can factor out a 3 , so n^2 = 3(3m^2 + 2m\ell) + \ell^2 . This implies n^2 is not a multiple of 3 since it’s an integer times 3 plus a number that isn’t a multiple of 3 (that’s the \ell part). We have proved the contrapositive which implies our original proposition (P \Rightarrow Q is the same as \neg Q \Rightarrow  \neg P ).

Now let’s move on to the main proof. Assume, by way of contradiction that the square root of 3  is rational. If the square root of 3 is rational then we can write \sqrt{3} = \frac{a}{b} with a and b not sharing any common factors. We can do some math: 3 = \frac{a^2}{b^2} which means 3b^2 = a^2 . But this means a^2 is a multiple of 3 since it’s an integer times 3 . We just proved that if n^2 is a multiple of 3 then so is n . This means that a is a multiple of 3. But if a is a multiple of 3 it can be written as 3m . Let’s plug this in to get 3b^2 = (3m)^2 , simplifying we get that 3b^2 = 9m^2 . Let’s divide through by 3 to get b^2 = 3m^2 . This means that b^2 is a multiple of 3 since it’s 3 times an integer. But again, if b^2 is a multiple of 3 then so is b . We started off by assuming that a and b had no common factors and we just showed that they share a common factor of 3 . We’ve derived a contradiction to our proposition that \sqrt{3} is rational, therefore it must be irrational.

Second Life’s Effect on the Disabled

As Fran and Barbara tell it, the more time Fran spent in Second Life, the younger she felt in real life. Watching her avatar hike trails and dance gave her the confidence to try things in the physical world that she hadn’t tried in a half decade — like stepping off a curb or standing up without any help. These were small victories, but they felt significant to Fran.

That is from a fascinating new article on the effect Second Life has had on the disability community. It seems that immersion in online worlds gets a lot of push back these days, but (at least as this article tells it) immersive virtual worlds can be a major positive influence for those across the disability spectrum.

Here is a short video about Fran, the main character in the story.

Stock Price Simulation

Larry Wasserman presents an interesting simulation in Problem 11, Chapter 3 of All of Statistics. The problem asks you to simulate the stock market by modeling a simple random walk. With probability 0.5 the price of the stock goes down $1 and with probability 0.5 the stock prices goes up $1. You may recognize this as the same setup in our two simple random walk examples modeling a particle on the real line.

This simulation is interesting because Wasserman notes that even with an equal probability of the stock moving up and down we’re likely to see patterns in the data. I ran some simulations that modeled the change in stock price over the course of 1,000 days and grabbed a couple of graphs to illustrate this point. For example, look at the graph below. It sure looks like this is a stock that’s tanking! However, it’s generated with the random walk I just described.

stock_plot1

Even stocks that generally hover around the origin seem to have noticeable dips and peaks that look like patterns to the human eye even though they are not.

stock_plot2

If we run the simulation multiple times it’s easy to see that if you consider any single stock it’s not so unlikely to get large variations in price (the light purple lines). However, when you consider the average price of all stocks, there is very little change over time as we would expect (the dark purple line).

stock_plot3

Here is the R code to calculate the random walk and generate the last plot:

################################################################
# R Simulation
# James McCammon
# 2/20/2017
################################################################
# This script goes through the simulation of changes in stock
# price data.

# Load plotting libraries
library(ggplot2)
library(ggthemes)
library(reshape2)

#
# Simulate stock price data with random walk
#
    n = 1000 # Walk n steps
    p = .5 # Probability of moving left
    trials = 100 # Num times to repeate sim
    # Run simulation
    rand_walk = replicate(trials, cumsum(sample(c(-1,1), size=n, replace=TRUE, prob=c(p,1-p))))

#
# Prepare data for plotting
#
    all_walks = melt(rand_walk)
    avg_walk = cbind.data.frame(
      'x' = seq(from=1, to=n, by=1),
      'y' = apply(rand_walk, 1, mean)
    )

#
# Plot data
#
    ggplot() + 
      geom_line(data=all_walks, aes(x=Var1, y=value, group=Var2), color='#BCADDC', alpha=.5) +
      geom_line(data=avg_walk, aes(x=x, y=y), size = 1.3, color='#937EBF') +
      theme_fivethirtyeight() +
      theme(axis.title = element_text()) +
      xlab('Days') +
      ylab('Change in Stock Price (in $)') +
      ggtitle("Simulated Stock Prices")