4

I don't know anything about statistics and it was difficult for me to find A way to describe my question that was clear.

I am doing some initial research on a system that will measure the uniformity of electricity across a conductor. Basically we need to measure how evenly a signal is spread out on a surface.

I was doing research on how to determine uniformity of a data set and came across this question which is promising. However I realized that I don't know what unit to use to express uniformity. For example, if I take 100 equally spaced measurements in a grid pattern on the surface of an object and want to describe how uniform the values are, how would you say it?

  • "98% uniform?" - what does that mean? 98% of what?
  • "The signal is very evenly dispersed" - OK, great... but there must be a more specific or scientific way to communicate that... how "evenly"? What is a numeric representation of that statement?

Statistics and math are not my thing so if this seems like a dumb question, be gentle...

Community
  • 1
  • 1
scubasteve
  • 2,718
  • 4
  • 38
  • 49
  • 1
    This is a programming form. There's a [stack exchange](http://math.stackexchange.com/) for that. Or maybe [this one](http://electronics.stackexchange.com/)... – jswolf19 Oct 21 '11 at 03:58
  • 1
    Or [stats.SE], or maybe even [dsp.SE] (though that might be a stretch), but for a basic question like this I think [math.SE] seems to be the place – David Z Oct 21 '11 at 04:37
  • @jswolf19 you are correct, I came across the aforementioned question and I forgot where I was. – scubasteve Oct 21 '11 at 05:14

2 Answers2

6

You are looking for the Variance. From Wikipedia:

In probability theory and statistics, the variance is a measure of how far a set of numbers are spread out from each other. It is one of several descriptors of a probability distribution, describing how far the numbers lie from the mean

Recipe for calculating the Variance:

1) Calculate the Mean of your dataset

2) For each point, calculate (X - Mean)^2

3) Add up all those (X - Mean)^2

4) Divide the by the number of points

5) That is it

The Variance gives you an idea of how "equal" your points are. A Variance of zero, means all points are equal, and then increases as the points spread out.

Edit

Here you may find better algorithms (more numerically stable) for calculating the variance.

Dr. belisarius
  • 60,527
  • 15
  • 115
  • 190
  • Actually, that's a pretty reasonable way to do it. If you're going to be adding up millions of points, you might want to be careful about *how* you add them all up (e.g., adding in a binary tree is more stable than using an accumulator), but otherwise I don't think you can improve on the above... – comingstorm Oct 21 '11 at 17:08
  • This is a good first-order method. Uniformity on a surface, though, may need more definition in this case which might change the algorithm. For example, given a set of measurements, are they considered equally uniform if they're randomly dispersed over the surface versus increasing in value as you go from one side of the surface to the other? Just something to think about. – lurker Oct 26 '11 at 01:36
  • @mbracht You're right. I missed the _surface_ part completely. In fact probably you need to measure something per unit of area, which requires knowing or estimating the _dS_ of the surface. – Dr. belisarius Oct 26 '11 at 02:03
1

One has to first define "uniformity". Does it mean lack of variance in the data? Or does it also mean other things like lack of average change across a surface or over time?

If it's simply lack of variance in data, then the variance method already described is the ticket.

If you are also concerned about average "shift" in measurement across the surface, you could do a linear (or in this case a "cylindrical" or "planar") fit of the data to determine whether there's a general trend up or down in the data in either of two dimensions. (If the conductor is cylindrical, then radially and axially. If it's planar, then x/y.)

These three parameters, then, would give a reasonable uniformity measure by the above definition: overall variance (that belisarius described), and "flatness" in each of two dimensions.

lurker
  • 56,987
  • 9
  • 69
  • 103