MathGroup Archive 2012

[Date Index] [Thread Index] [Author Index]

Search the Archive

Binning data points

  • To: mathgroup at smc.vnet.net
  • Subject: [mg125091] Binning data points
  • From: Niles <niels.martinsen at gmail.com>
  • Date: Tue, 21 Feb 2012 06:12:21 -0500 (EST)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com

Hi

Say I have a data set (x_i, y_i) such as of the form

{
{4.4077, 8.41282*10^-7},
{9.39964, 3.3636*10^-6},
{14.3781,  7.56237*10^-6},
{19.3462, 0.00001343},
{24.3073, 0.0000209557},
...
}

The first coordinate is time, the second a weight. The sum of the
weights equal 1, so I am dealing with a probability density function.
I want to bin all the data points such that data points with their x-
coordinates within some range delta_x are binned together, and the
total y-coordinate of that bin should be the sum of all the y's of the
data points in the respective bin. So basically something like a
histogram.

How can I do this?

Best regards.
Niles.



  • Prev by Date: Re: How best to implement a hash table in Mathematica
  • Next by Date: Re: How to Multiply a Sequence of #s that depends on the previous #
  • Previous by thread: Re: Print Selection, Mathematica 7, in Lion
  • Next by thread: Re: Binning data points