Author |
Topic |
|
pcomis2
3 Posts |
Posted - 09/10/2016 : 7:50:15 PM
|
Hello Everyone,
I have a set of data (two columns, X and Y) and I'm wondering if there is a way to perform a binning operation much like a histogram or the frequency counts option in descriptive statistics, except I want to calculate the average, not counts or frequency. Essentially I would like to arrange my set of data into a specified number of bins (going from 5,929 data points to 50, i.e. 50 bins) and calculate the average of Y in each corresponding X bin. My intended result of this operation would then be to plot the 50 data points located at the bins from the X column each with a corresponding average value in the Y column. Does anyone know how this can be done?
Thank you for any help or ideas, Patrick
Origin Ver. and Service Release: OriginPro 2015 (64-bit) Sr2 b9.2.272 (Academic) Operating System: Windows 10 Pro (Version 1511) |
|
JacquelineHe
287 Posts |
Posted - 09/12/2016 : 04:14:00 AM
|
Hi Patrick,
Could you try to use 2D Frequency Counts/Binning tool (Select “Statistics: Descriptive Statistics: 2D Frequency Counts/Binning” in the menu), and choose Mean as the Quantity to Compute in the dialog. Then it will compute and output mean for each bin. Please refer to: http://www.originlab.com/doc/Origin-Help/2D-Freq-Count-Binning
Thanks Jacqueline OriginLab |
Edited by - JacquelineHe on 09/12/2016 04:53:03 AM |
|
|
pcomis2
3 Posts |
Posted - 09/12/2016 : 09:47:26 AM
|
Hi Jacqueline, thanks for the response. I guess I just don't understand what the results of the 2D Frequency Counts/Binning tool are then. After selecting the tool with my two columns highlighted, I specify ends for my bins to be the minimum and maximum values in the columns and then for quantity to compute, I select mean. But the output worksheet isn't just two columns, rather, it's a data set of size 50x51. Shouldn't it be a data set of size 50x2 where the first column is the bin locations for X and the second column the corresponding mean values at location X for Y?
Thanks for your help, Patrick |
|
|
JacquelineHe
287 Posts |
Posted - 09/13/2016 : 01:41:36 AM
|
Hi Patrick,
I am afraid maybe I misunderstood your first posted, and sorry for the inconvenience.
Getting the mean value for each bin for a column that does not be supported in a tool directly.
Could you please refer to the following forum? In the forth posted, it shows detail steps for how to get the mean value of the bins in a column. http://www.originlab.com/forum/topic.asp?TOPIC_ID=20307
Thanks Jacqueline OriginLab |
|
|
|
Topic |
|
|
|