The Racially Motivated War on Drugs

Blacks and whites use drugs at roughly the same rates (9.8% for blacks vs 8.5% for whites).  So why, then, do blacks make up around 60% of drug convictions despite being 12% of the population?  And why are blacks so much more likely to get arrested on drug-related charges?  And while we’re at it, why are the sentences blacks receive vastly larger than those whites are given?

Blacks are much more likely to be arrested on drug-related charges than whites, despite roughly equal levels of drug usage

The good news, if there were any to be gleaned from the data, is that the ratio is at least trending in the right direction, even if it’s still grossly disproportionate and completely out of whack with what it should be if blacks and whites were treated equally, in which case, going by the usage percentages, the ratio of black to white drug arrests should be 1.15, not 3.39.

Could it be that our drug policy would see less support if, instead of raids in the projects, police started busting down doors in predominantly white suburbs?

Posted in Uncategorized | Leave a comment

The Financial Impact of Health Care Reform

Recently, I’ve been reading a lot of whining from the right about how insurance rates are going up as a result of the health care reform bill that became law in March – nevermind that the data for 2010 isn’t even out yet.  Nonetheless, I decided to take a look at health insurance rates over the last decade (because that’s what Kaiser has quickly accessible) and surprise, insurance rates have been rising faster than inflation since long before HCR became law.

Insurance premium growth far outpaces inflation

In constant 2000 dollars, the average insurance rate for a single individual has grown by 58%.

It’ll be interesting to add 2010 to that chart, but we can still learn something from it even before that data point is in.  This law did not magically appear out of nowhere in March 2010.  Quite the contrary, it was a major point in the 2008 election and work on HCR began in earnest in 2009.  Yet, if you look at the graph, it doesn’t seem like anything in particular was happening in the 2007-2009 time frame.  Are we to believe the insurance companies were unaware of HCR and had absolutely no reaction to it until it became law, at which time they suddenly started gouging customers?

Posted in Uncategorized | Leave a comment

Image Processing

I’ve been playing around with feature tracking and image processing in video using python a bit lately and thought it would be interesting to look at the mathematics underneath the cool technology. First up is convolution, since it’s the basis for much of the technology.

Let’s say we have some function f(x) and we want to “mix” it with some other function g(x). There are variety of ways we could do this, but one is the convolution,

We are, of course, free to Fourier transform this to get a somewhat nicer result.

Of course, if we want to apply this to images, we need a discrete expression, which of course we get by changing the integral to a sum.

Discrete ConvolutionIn practice, we’re probably not going to work with line images, so this needs to be expanded at least to 2D and perhaps even 3D.

2D Discrete ConvolutionProbably the simplest (and one of the most useful) application of this is as a way to approximate derivatives, which I will post about next time, along with some python code to show how this actually gets implemented and how we deal with nasty things like the fact that images do not have infinite extent.

Posted in Uncategorized | 1 Comment

Tea Party Venn Diagrams

Posted in Uncategorized | 1 Comment

Measure 66

It seems that every day there’s a new letter in the newspaper talking about how the “have nots” voted to gouge the “haves” in order to pay for state services.  So, is that actually true?

I took a look at the county by county results and compared that with the expected impact on the voters of each county.

M66_TaxCut

There is a very weak, basically insignificant correlation between the percentage of each county that voted for 66 and the percentage that will see a tax cut.  Not much to see here.

Looking at voting results versus the percent of each county’s population that is seeing their taxes go up was more interesting.

M66TaxIncrease

Here, the correlation is much stronger, but not in the direction the “No on 66” crowd would have you believe.

It could be that the poorer people in wealthier counties simply voted overwhelmingly to gouge their neighbors, which is certainly possible, in which case the “no on 66” crowd would have a point.  We won’t know for sure unless some detailed polling is done.

Posted in Uncategorized | 1 Comment

Reform Physics?

There was a movement back in the 90’s to stop teaching rigorous mathematics and replace it with group work, calculators, and guesswork, with the idea being that students would learn the material better if they discovered it on their own (with some guidance from the instructor).  It sounds like a good idea at first, but the result is students who can’t do even basic math.  They may have some “feeling” about division, but don’t you dare ask them to actually do it.  This approach drags down the people who would ordinarily be high achievers by covering less material less rigorously than a traditional course.  The emphasis on group work results in what is essentially an exercise in effective cheating.  Motivated students do the work while the rest of the group writes down answers, learning nothing in the process.  Motivated students who somehow manage to get paired with other motivated students wind up splitting up the workload, so they end up doing less and having a weaker grasp of the material.

Continue reading

Posted in Uncategorized | 1 Comment

Quick and dirty numerical ODE solver

I gave my APS talk this morning and spent the rest of the day working on my thesis.  I was uploading the latest version tonight (almost done!) when I noticed some old python code I had written to numerically solve first order ODEs using Euler’s method.

Perhaps this is an indication that I should get to work on the ODE solver portion of the C# code I’ve been (not) working on.

Posted in Uncategorized | 2 Comments

More Matrices (and a site update)

I’ve added a function to determine the trace of a matrix, since even though it doesn’t come up that often, it does come up occasionally, and it only takes about thirty seconds to code.

		public static double trace(double[,] matrix)
		{
			int n = Convert.ToInt32(Math.Sqrt(matrix.Length));
			double trace = 0;
			for(int i = 0; i< n; i++)
				trace += matrix[i,i];
			return trace;
		}

You may be wondering about the square root part. C#’s Length function returns the total number of elements in a matrix.  Since we’re passing in a square matrix, taking the square root gives the number of rows/columns.  At some point I should add code to check that the matrix is indeed square and error out gracefully if it isn’t.

I’ve also upgraded the site to WordPress 2.7 and changed the theme to something nice and simple.  The 2.7 migration shouldn’t result in any appearance or functionality changes, but the admin section is much nicer now.

Posted in Science | Tagged , , | 1 Comment

C# Physics Library Update

I’ve continued working on the C# code and currently have the ability to do a couple types of approximations/interpolations and find matrix determinants quickly.

I think the next thing I’m going to work on is finding the matrix inverses (probably via the Faddeev-Leverrier method) so I can find eigenvalues and eigenvectors.

There are, of course, countless libraries and software packages that could do these types of calculations me, and in practice I would in all likelihood use them.  Nonetheless, I think it’s useful to understand how those libraries work and thus, perhaps, when it is appropriate to use them as opposed to writing my own specialized code.  And of course, doing this is just plain fun.

Posted in Science | Tagged | 3 Comments

Computational Fun

In an effort to learn more C#, entertain myself, and prepare for a future sitting behind a computer doing simulations (assuming I get into graduate school), I started working on a C# library to help out with doing (discrete) numerical problems in physics.  The current plan is to have it do

  • Physical constants
  • Function approximation
  • Derivatives
  • Integrals
  • ODEs
  • PDEs
  • Matrices (eigenvalue problems)
  • Spectral analysis (fast fourier transforms, etc)

So far, I’ve mostly completed the physical constants bit, since that’s trivial and requires no real effort, and have started working on the approximation code, which is necessary to properly handle some of the latter things (e.g. determining slope at boundaries).

The basic idea is to make something that would cut down on the time required to write quick and dirty simulations.  It’s not intended to be the fastest or most elegant code, but simply something that works and gives correct answers.

Posted in Science | Tagged , , , | 1 Comment