如何使用mathematica输入频率数据 [英] how to input data with frequency using mathematica

查看:23
本文介绍了如何使用mathematica输入频率数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在如何在 Mathematica 中输入频率数据时遇到问题.例如,我有 0 有 10,000 个频率,1 有 9000 频率,2 有 3000 频率,4 有 1000 频率.谁能帮我将这些数据输入到 mathematica 中,然后我需要找到这些数字的一阶、二阶和三阶矩.非常感谢!

I am having trouble on how to input data with frequency in Mathematica. For example, I have 0 with 10,000 frequencies, 1 with 9000 freq, 2 with 3000 freq and 4 with 1000 freq. Can anyone help me to input this data into mathematica and then I need to find the first, second and third moment of those numbers. Thanks a lot!

推荐答案

类似:

data = Join[ConstantArray[1, 9000], ConstantArray[2, 3000], ConstantArray[4, 1000]];

Mean[data]
Variance[data]
Kurtosis[data]

这篇关于如何使用mathematica输入频率数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆