image
Physics Forums Logo
image
image
* Register * Upgrade Blogs Library Staff Rules Mark Forums Read
image
image   image
image

Go Back   Physics Forums > Other Sciences > Computing & Technology > Programming & Comp Sci


Reply

image Comparing data sets of different sizes Share It Thread Tools Search this Thread image
Old Jun3-09, 11:47 AM                  #1
cepheid
 
cepheid's Avatar

cepheid is Offline:
Posts: 2,056
Recognitions:
Homework Helper Homework Helper
Science Advisor Science Advisor
Comparing data sets of different sizes

I have two data sets, each having its own array of x values and its own corresponding array of y values. I want to divide the y-values of two data sets. The problem I am having is that the x arrays for the two sets have totally different spacings (bin sizes). One set has 4175 data points, evenly spaced. The other set has its x values NOT evenly spaced and there are only 1919 data points in it.

What would be the best way of going about modifying the second data set so that it might be compared to the first one? I could just interpolate, but then I am worried that I am basically just adding made up data points to the y values for the second set, and that I might destroy some features in it, or add spurious ones.
  Reply With Quote
Old Jun3-09, 05:51 PM                  #2
cepheid
 
cepheid's Avatar

cepheid is Offline:
Posts: 2,056
Recognitions:
Homework Helper Homework Helper
Science Advisor Science Advisor
Re: Comparing data sets of different sizes

Hmm, I decided that the original context (astronomy) was helpful after all. So if you think you can help me, please see this original thread in the general astronomy subforum:

http://www.physicsforums.com/showthread.php?t=317695
  Reply With Quote
Old Jun3-09, 06:14 PM                  #3
Maxwell

Maxwell is Offline:
Posts: 529
Recognitions:
PF Contributor PF Contributor
Re: Comparing data sets of different sizes

Originally Posted by cepheid View Post
I have two data sets, each having its own array of x values and its own corresponding array of y values. I want to divide the y-values of two data sets. The problem I am having is that the x arrays for the two sets have totally different spacings (bin sizes). One set has 4175 data points, evenly spaced. The other set has its x values NOT evenly spaced and there are only 1919 data points in it.

What would be the best way of going about modifying the second data set so that it might be compared to the first one? I could just interpolate, but then I am worried that I am basically just adding made up data points to the y values for the second set, and that I might destroy some features in it, or add spurious ones.
A few questions:

Are the positions in the x arrays relevant? You can perhaps zero-pad the smaller array to make it the same size of the larger one. This is a tricky question to answer because it is certainly do-able, but we'd need to know more about the data and if the order and positioning of the data points is important.

So essentially you have 4 arrays? x1, y1, x2, y2? And the y arrays are derived from the x arrays?

Can you maybe sample the larger x array and extract the number of values equal to the smaller x array? Then generate y arrays that are of equal size?
  Reply With Quote
Old Jun3-09, 06:24 PM                  #4
cepheid
 
cepheid's Avatar

cepheid is Offline:
Posts: 2,056
Recognitions:
Homework Helper Homework Helper
Science Advisor Science Advisor
Re: Comparing data sets of different sizes

The positions in the x arrays are relevant. The x arrays are wavelengths. The y arrays are essentially intensities. So these are spectra. See the astronomy thread that I linked to for more details.

Yes, there are four arrays as you described. The y arrays are not derived from the x arrays. They are observed/measured intensities for each wavelength.

Sampling the larger x array may not be that useful, since the other data I have that I'm going to calibrate off these data are equally as large. Also, what if none of the wavelengths in x1 exactly match those in x2?
  Reply With Quote
Old Jun7-09, 12:05 AM                  #5
Jeff Reid

Jeff Reid is Offline:
Posts: 2,702
Re: Comparing data sets of different sizes

Seems to me you're stuck interpolating. When the samples are taken, how is the filtering done: how steep are the ramps of the high and low pass band filters for each frequency range used in the sample gathering? The filters are in effect acting as interpolators already. When you mention "equally" spaced, is this linear, logarithmic, ... ? How large is the range and domain of the sampled data set? Interpolation somewhat modelled after the filters might improve the results.
  Reply With Quote
image image
Reply
Thread Tools


Similar Threads for: Comparing data sets of different sizes
Thread Thread Starter Forum Replies Last Post
Comparing data sets of different size cepheid General Astronomy 4 Jun3-09 11:45 PM
Diffraction Experiment - Comparing theory with my data poonintoon Introductory Physics 1 Mar2-08 08:43 AM
Comparing two averages with different group sizes Mohammad Set Theory, Logic, Probability, Statistics 1 Nov3-06 04:51 PM
Comparing two simple sets Loren Booda Set Theory, Logic, Probability, Statistics 3 Feb7-06 12:34 AM
Statistics: Data Sets bijanv Precalculus Mathematics 5 Nov25-05 02:27 PM

Powered by vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd. © 2009 Physics Forums
Sciam | physorgPhysorg.com Science News Partner
image
image   image