The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
 All Forums
 Origin中文论坛
 Origin 中文论坛 (Chinese Origin Forum)
 请教关于origin数据统计处理的问题

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
   

T O P I C    R E V I E W
彩色的云 Posted - 06/28/2016 : 09:59:12 AM
Origin Ver. and Service Release (Select Help-->About Origin):
Operating System:我现在有如图所示的一组数据,想分别计算不同数据范围内数值加和对所有数值总和的贡献百分数,并画频率分布图。比如我在0-30之间每间隔5分一个数据档,然后分别计算0-5,5-10,10-15等范围内的数据的加和除以所有数据的和,得到几个百分数,然后对他们进行画图,要怎么实现,主要是数据统计处理那部分不知道怎么弄,麻烦帮忙,谢谢!
1   L A T E S T    R E P L I E S    (Newest First)
yuki_wu Posted - 06/29/2016 : 03:26:45 AM
Hi,
你可以有如下两种方法对数据分组求和。

第一种方法:
假设你有原始数据于col(A),则可:

1.在col(B)并输入你需要分组的区间值,如0,5,10,15...
2.新增col(C),选择col(C)并右键选择Set Column Values...
3.在Set Values的对话框中输入:Index(Col(A),Col(B),1)
关于function Index的详细用法可以参考
http://www.originlab.com/doc/LabTalk/ref/Index-func

4.选择col(A),在菜单栏选择Statistics: Descriptive Statistics: Statistics on Columns
5.在Statistics on Columns对话框中,在Group中添加col(C)

6.点击OK后,在Worksheet DescStatsQuantities1中就可以看到各区间的和

7.将各区间的和值除于总和即可。
注:计算总和值可重复第4步和第5步,但不要设置Group


第二种方法:
假设col(A)中有[0,20]以内原始数据,分组为(0.5],(5.10],(10.15],(15.20]

1.新增col(C),打开Command Window并运行以下scripts:

range nn=[Book1]1!2;
for(ii=1; ii<=4; ii++)  
{
double aa;
double bb=(ii-1)*5; //计算区间值
aa=sumif(col(A),"col(A) > bb && col(A) <= (bb+5)"); //计算各区间和值
nn[ii]=aa;
};

stats ix:=col(1) sum:=mysum; //计算总和值
range rr=[Book1]1!3;
rr=nn/mysum; //计算百分比


有关sumif的详细用法可参考:
http://www.originlab.com/doc/LabTalk/ref/Sumif-func

Yuki

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000