Monday, December 31, 2018

Published December 31, 2018 by with 2 comments

What Does It Mean When a Study Controls for a Variable?

If you read scientific studies, you'll often see the phrases 'controlled for' or 'adjusted for' to describe variables like age, income, or gender that are accounted for in their statistical analysis. What does this mean?
Read More
      edit

Thursday, December 27, 2018

Published December 27, 2018 by with 0 comment

Relationship between Union Membership and Income Inequality in the US

One of the theoretical benefits of labor unions is that they boost incomes overall for the majority of workers. Do the data support this?
Read More
      edit

Wednesday, December 12, 2018

Published December 12, 2018 by with 7 comments

How Has The Stock Market Performed Under Each President?

I was curious what the actual yield was under each president, so here it is...


Read More
      edit
Published December 12, 2018 by with 0 comment

Stock Market Variability By President

Has the stock market been abnormally chaotic under Trump?
Read More
      edit

Monday, November 19, 2018

Published November 19, 2018 by with 0 comment

Comparing 2014 And 2018 Exit Polls

I wrote a simple tool that compares CNN's 2014 and 2018 midterm exit poll data.
Read More
      edit

Sunday, November 11, 2018

Published November 11, 2018 by with 0 comment

Who Were The House Midterm Voters In Each Party?

I made a simple tool that converts CNN's exit poll numbers into voter demographics for each party.
Read More
      edit

Saturday, November 3, 2018

Published November 03, 2018 by with 1 comment

How Do You Make A Biased Coin Fair?

Imagine you have a coin that is biased towards heads, and you want to make a fair (50/50) decision with it. What can you do?
Read More
      edit

Tuesday, October 23, 2018

Published October 23, 2018 by with 0 comment

How To Customize Plotly's Modebar

There's a little bar with buttons that appears when you hover at the top of a plotly graph. It is called the 'modebar'. There is essentially no documentation on customizing it, so I've typed up what I've done to help the next person who needs this.

add button to plotly modebar


Read More
      edit

Monday, October 8, 2018

Published October 08, 2018 by with 1 comment

Role Of Luck In Fantasy Football

Luck is a massive factor in fantasy football...
Read More
      edit

Friday, October 5, 2018

Published October 05, 2018 by with 0 comment

Why Does Mars Appear To Move Backwards Sometimes

From Earth, Mars appears to move backwards sometimes. How does this happen if it's in an elliptical orbit around the Sun?
Read More
      edit

Wednesday, October 3, 2018

Published October 03, 2018 by with 1 comment

Why Is Overfitting Dangerous

Imagine you have some measurements and you want to approximate an underlying model for them. Shouldn't you pick the one that most closely matches the data?
Read More
      edit

Friday, September 28, 2018

Published September 28, 2018 by with 1 comment

How Do I Convert An Election Poll Into A Win Probability

You normally see polls as something like 51% candidate A, 47% candidate B, and 2% other. How do you estimate a win probability from that?
Read More
      edit

Wednesday, September 19, 2018

Published September 19, 2018 by with 0 comment

Understanding Half-Life

The rate at which radioactive atoms decay can be given as the 'half-life' and I've run into a couple of misconceptions around that so I tried simulating it.
Read More
      edit

Tuesday, September 4, 2018

Published September 04, 2018 by with 1 comment

I Fell Prey To Selection Bias

These things are sneaky and I got caught in one that I feel is worth typing up...
Read More
      edit

Sunday, August 19, 2018

Published August 19, 2018 by with 1 comment

How Do I Make A Div-Specific Modal In Vue

I most recently wrote about making a div-specific modal, and this post just shows how to do it in Vue.


Read More
      edit

Tuesday, August 14, 2018

Published August 14, 2018 by with 1 comment

How Do I Make A Modal Dialog For A Div Instead Of The Whole Page?

In my quick scan for modal libraries for javascript/html/css, everything was for the entire page. I wanted something for a specific div so I put together a quick demo of one way to do this.



Read More
      edit

Saturday, July 28, 2018

Published July 28, 2018 by with 1 comment

How Do I Make Plotly Faster?

Plotly is a really nice plotting library, but it can be quite slow. Is there any way to speed it up?
Read More
      edit

Saturday, July 7, 2018

Published July 07, 2018 by with 1 comment

How Do You Make Plotly's Click And Double-Click Events Work Together?

There's an annoying issue in plotly. If you listen for both click and double-click events, the click events will be triggered on double clicks also. Is there a way to effectively have a 'single click' event?

Read More
      edit

Sunday, June 10, 2018

Published June 10, 2018 by with 1 comment

Estimating How Often Balls Might Collide Mid-air At Topgolf

I took a crack at estimating how often balls would collide while in the air at Topgolf.

Read More
      edit

Friday, June 1, 2018

Published June 01, 2018 by with 1 comment

What Are The Actual Yields From Investing In The Dow (DJIA)?

What sorts of real returns did US investors get throughout history?

Read More
      edit

Sunday, May 27, 2018

Published May 27, 2018 by with 1 comment

How To Use Plotly In Vue

      edit

Saturday, May 26, 2018

Published May 26, 2018 by with 1 comment

How To Write A Simple Calculator With Vue

We are considering using Vue for a project at work, and this was a fun little thing to write to get started with it so I figured I'd type it up as a simple example for anyone else investigating Vue...

Vue.js calculator example

Read More
      edit

Friday, May 11, 2018

Published May 11, 2018 by with 0 comment

Waiting For Multiple Ajax Calls To Complete Using Async/Await

I ran into this problem today and decided to put together a quick demo of one method for solving it...

Read More
      edit

Wednesday, April 25, 2018

Published April 25, 2018 by with 0 comment

Playing With Bucket Sorting

Bucket sorts are pretty interesting and seem to be covered less often than quicksort, mergesort, etc...
Read More
      edit

Sunday, April 15, 2018

Published April 15, 2018 by with 1 comment

Sticker Collecting Problem

If you buy a box of cereal and get a sticker, there are 5 unique sticker types, and they occur with equal probability, how many boxes of cereal do you need to buy to get all 5 sticker types?
Read More
      edit

Friday, March 9, 2018

Published March 09, 2018 by with 2 comments

Regression Toward The Mean In The NBA

Regression toward the mean is a fascinating concept, and I went through some NBA data to test it...

Free throw % from one year to the next

Read More
      edit

Thursday, February 15, 2018

Published February 15, 2018 by with 0 comment

Planet Orbiting Binary Stars

I was curious what types of orbits you could get for a planet orbiting a binary star system, so I played with it a bit and collected some of the interesting results.

Read More
      edit

Thursday, February 8, 2018

Published February 08, 2018 by with 20 comments

N-Body Problem And Our Solar System

I was curious how stable our solar system is, so I started playing a bit with the n-body problem and here are some results. I've also included simple source code in MATLAB and Python if you want to play with it yourself.
Read More
      edit

Saturday, February 3, 2018

Published February 03, 2018 by with 0 comment

Visualizing Algorithm Complexity

I like to optimize stuff at work at tend to rant about algorithm complexity to my coworkers, so I figured I'd see if I could visualize it in a way that's meaningful to non-developers.
Read More
      edit

Friday, January 26, 2018

Published January 26, 2018 by with 1 comment

Monte Carlo Simulations And Pi

Monte Carlo approximations for values are a really cool concept so I went ahead and visualized possibly the most well-known one...
Read More
      edit

Thursday, January 25, 2018

Published January 25, 2018 by with 0 comment

I Wrote A Book Of Solved Problems

I was interested in how to write an ebook, so I went ahead and wrote one. It contains a few of the problems that are here and a number of new ones. It's $0.99 on Amazon and called 'Answered with Math', so check it out if you're interested.

Read More
      edit

Saturday, January 6, 2018

Published January 06, 2018 by with 1 comment

What Value Minimizes The Sum Of Squared Errors For A Group Of Numbers?

I noticed this result at work one day and it caught me off guard...
Read More
      edit