# math

## a fun little exercise

I had a conversation today about the curse of dimensionality and ended up pulling out ESL as a resource for some more talk on this. In there I found a great little derivation that both seems ridiculously complicated on its face (it sounds complicated), has deep practical implications, and can be done entirely with facts you learn in an intro probability and statisitcs course.

## Codenames and Needless Pedantry

I was at a Halloween party last night and we played the game Codenames, which is a very fun party game. In the game, two teams compete to find their colored squares on a 5x5 grid. The grid starts with cards on it, each with a single word, and only the Spymasters have the map to which square corresponds to which color. The twist is that the Spymasters (there's one for each team) can only communicate to their team using a single word and a number, where the number is the number of cards that correspond to the word in some way. So, for example, the Spymaster might say "ocean, four" and their team now has to find four cards that somehow correspond to "ocean". If you pick the wrong card your turn ends, and you may end up revealing one of the opposing team's cards by mistake (which bonus to them).

## An Idiot Explains Statistics

I read Cathy O'Neil's Weapons of Math Destruction a few weeks ago and I continue to mull it over, and I want to spend some time expanding on one small part of the book. In WMD Ms. O'Neil talks a fair bit about how models can lead to terrible outcomes due to a fusion of their particular blindspots and perverse incentives. One thing I would like to expand upon is the how these blindspots can develop naturally and be obscured by the naive performance metrics that one typically uses to decide how well the model is functioning.

tags: statistics, accuracy,

## Abusing Chi Squared

This is one of those questions I could probably answer with research, but I'm lazy so I am going to do simulations. Anyways, it came up in my life to check a data-set to see if the values are normally distributed. There are a couple of ways of doing this (I lean towards doing a KS test) but one that was recommended was to do a $\chi^2$ test. Of course the $\chi^2$ test typically requires the data to be in discrete bins, and this got me thinking: surely the test itself is highly dependent upon the bin size I choose so, presumably, I could fiddle with that variable to get whatever answer I wanted. Presumably.

tags: python, statistics, random numbers,

## Another Mathematical Card Trick

Matt Parker recently posted a video with a neat mathematical card trick. Like all good things in life it involves lots tedious counting and shuffling, so brace yourself.

## Partitioning Teams Part 2: Electric Boogaloo

In a previous post I looked at various ways of partitioning up a group of people into teams, such that each individual's preferences of teammates is taken into consideration and the overall happiness of the team, and thus the corporation, is maximized. I've been spinning ever more complicated way of doing this in my head, so why not try one out?

tags: partitioning, python,

## Dumb ideas and experiments

Recently I was talking, on the internet no less, with someone who was trying to take some data presumably drawn at random and find the parameters of the corresponding pdf (some weird Weibull something-er-other for doing risk modelling but that's beside the point for what follows). In simple cases the common man would look up the maximum likelihood estimators for the parameters of the given pdf, or maybe numerically find the parameters that minimize the Kolmogorov-Smirnov statistic or something. This guy's plan was to do a non-linear least squares fit of the pdf.

tags: random numbers, python, statistics,

## Matt Parker's mind boggling card trick

Matt Parker released a video recently about a mind-bogglng card trick wherein he goes out of his way to introduce randomness into the shuffling of a deck of cards into two piles...and yet can make rock solid predictions about how many red cards and black cards are in each pile.

tags: card trick,

## Partitioning Teams

I found an interesting problem in Ask Metafilter the other day about sorting people into work groups. The problem is this: suppose you have a group of 90 people and you want to sort them into 3 equal sized teams. To facilitate this you ask them to write down the 5 people they most want to work with. What method (algorithm) should you use to sort these people such that you accomodate the most preferences?

tags: partitioning, python,

## The toy production line, revisited

I built a toy model of a production line, earlier, and now I'm back to bludgeon it with more statistics.

## Guessing random numbers and numberphile

A recent numberphile episode had a neat idea of how to, apparently, beat the odds in guessing whether one known number is larger than an unknown random number, by adding a third random number.

tags: random numbers, numberphile, python,

## A match-stick production line

I am reading The Goal and in one chapter there is a toy model of a factory, in which boy scouts move matches from one bowl to the next trying to move matches to the end of the line, how many they can move from their bowl determined by a roll of a dice.

## Two dimensional turbulent jet -- part 2

Continuing on with the analysis of turbulent flow in a jet issuing out of a small slit running along the x-y axis with length (in the y-direction) W and basically no width. The flow issues forth in the positive z direction into a semi-infinite reservoir of stationary fluid (same fluid …

tags: fluid dynamics, jet,

## Two dimensional turbulent jet -- part 1

Moving into turbulent flow now, I'm going to look at a jet issuing out of a small slit running along the x-y axis with length (in the y-direction) W and basically no width. The flow issues forth in the positive z direction into a semi-infinite reservoir of stationary fluid (same …

tags: fluid dynamics, jet,

## Visualizing transient laminar pipeflow

In a previous post I derived some equations for the velocity distribution as a function of time in transient pipe flow. Here it is visualized by Sage.

The Sage code is as follows

import mpmath as mp
xi, tau = var('xi tau')

def phi(xi,tau,n):
sum = 0
for …

tags: fluid dynamics, pipe flow,

## Startup of laminar pipe flow

I've spent a fair bit of time examining various kinds of pipe flow, but so far only at steady state. This time I take a kick at the transient flow cat, looking at start-up of laminar pipe flow (Transport Phenomena 4D.2)

Suppose the same old cylindrical coordinates, assuming incompressible …

tags: fluid dynamics, pipe flow,

## Flow through a porous medium, with pipes!

Flow in and around pipes is old hat at this point, so to keep things fresh what about flow through porous medium, into a pipe? (Transport Phenomena 4C.4)

Suppose fluid is coming in through the walls of a pipe, say a ceramic tube with a pressure at the outside …

tags: pipe flow, fluid dynamics,

## The pressure field around a bubble

Previously, I figured out the velocity field for creeping flow around a bubble, and made a nice graphic to go with. This time I solved through for the pressure field, and this is what it looks like (along the plane y=0, gauge pressure, all other constants 1)

The derivation …

tags: fluid dynamics, creeping flow, gas,

## Creeping flow around a bubble

When fluid flows around a gas bubble, circulation within the bubble dissipates energy away from the interface and the interfacial shear stress is reduced. In this problem (4B.3 Transport Phenomena) I look at what happens when that shear stress is negligible.

Flow is coming up along the positive z-axis …

tags: fluid dynamics, creeping flow, gas,

## time and space dependent velocities: the case of suddenly applied wall stress

Previous examples in fluid mechanics assumed steady state. This time lets try something else and imagine a simple non-steady state scenario. Imagine a semi-infinite fluid bounded by a wall at y=0, what happens if the shear stress at the wall undergoes a step-change, at time t=0, to some …

tags: fluid dynamics,

Page 1 / 2