matlab中normfit函数进行正太分布拟合
一、简介
正态分布(Normal distribution)又名高斯分布(Gaussian distribution),是一个在数学、物理及工程等领域都非常重要的概率分布,在统计学的许多方面有着重大的影响力。
若随机变量X服从一个数学期望为μ、标准方差为σ2的高斯分布,记为:
- X∼N(μ,σ2),
则其概率密度函数为
正态分布的期望值μ决定了其位置,其标准差σ决定了分布的幅度。因其曲线呈钟形,因此人们又经常称之为钟形曲线。我们通常所说的标准正态分布是μ = 0,σ = 1的正态分布。
二、代码
(1)pdf 和 cdf函数的说明、
Probability density function(PDF) 概率密度函数;
cumulative distribution function ; CDF 是累积分布函数
(2)正态分布(normpdf normcdf)
- clc
- clear all
- close all
- dataall = load('G:\zyp_thanks\metro_test\1-07\529_2.csv');
- data = dataall(:,3);%指定列
- [mu,sigma]=normfit(data);%estimate of the mean and standard deviation in data
- [y,x]=hist(data,6);%creates a histogram bar plot of data,sorts data into the number of bins specified by nbins
- %return the categorical levels correponding to each count in N
- bar(x,y,'FaceColor','r','EdgeColor','w');box off
- xlim([mu-3*sigma,mu+3*sigma]) % sets the axis limits in the current axes to the specified values
- a2=axes;
- % computes the pdf at each of the values in X using the normal distribution
- % with mean and standard deviation sigma.
- ezplot(@(x)normpdf(x,mu,sigma),[mu-3*sigma,mu+3*sigma])
- set(a2,'box','off','yaxislocation','right','color','none')
- title '频数直方图与正态分布密度函数(拟合)'
- clc
- clear all
- close all
- dataall = load('G:\zyp_thanks\metro_test\1-07\529_2.csv');
- data = dataall(:,3);%指定列
- qqplot(data);
- % displays a quantile-quantile plot of the sample quantiles of X versus
- % theoretical from a normal distribution. if the distribution of X is
- % normal,the plot will be close to linear.
matlab中normfit函数进行正太分布拟合相关推荐
- matlab里randn是什么,matlab中randn函数用法
matlab中randn函数用法 MATLAB 中的randn函数 matlab函数 randn:产生正态分布的随机数或矩阵的函数 randn:产生均值为0,方差σ^2 = 1,标准差σ = 1的正态 ...
- matlab中的fscanf函数,matlab中fscanf函数
Matlab之print,fprint,fscanf,disp函数_数学_自然科学_专业资料.print: print 函数可以把函数图形保存成图片: minbnd = -4*pi; maxbnd = ...
- matlab表示520函数,MatLab中ln函数怎么表示呢
公告: 为响应国家净网行动,部分内容已经删除,感谢读者理解. 话题:MatLab中ln函数怎么表示呢?回答:lnx表示成log(x) 而lgx表示成log10(x)话题:怎样用MATLAB语言表示ln ...
- matlab中randint函数用法,matlab中rand randn randint函数的区别
matlab中rand函数是产生0到1的随机分布 matlab中randn函数是产生标准正态分布 randint是产生整数随机数,默认为0和1 %%%%%%%%%%%rand%%%%%%%%%%%%% ...
- matlab的newff语句,matlab 中“newff” 函数的参数设置
matlab 中"newff" 函数的使用方法技巧|和各参数的意义 先来一个简单的源程序让大家练习一下: % Here input P and targets T define a ...
- matlab中label的意思,matlab中label函数
Xlabel Ylabel Text Gtext Grid MATLAB 编程语言 Function Eval Feval Global 箭头图 绘图函数 星点图 Isletter Isspace 当 ...
- Matlab中bwmorph函数的使用
Matlab中bwmorph函数的使用 Matlab中提供了一个基于形态学的处理函数,即以膨胀.腐蚀等操作为基础,其语法格式如下: bw2=bwmorph(bw1,operation,n); 其中bw ...
- 9.matlab中repmat函数
来源: matlab中repmat函数的用法 - CSDN博客 https://blog.csdn.net/anqier1009/article/details/5214978 B = repmat( ...
- 如何在Matlab中获取函数参数的数目?
本图文详细介绍了Matlab中获取函数参数数目的方法.
最新文章
- Java网络编程——11.非阻塞I/O
- windows tasklist 查看应用、进程
- android lua sd卡,记Android层执行Lua脚本的一次实践
- 探索GaussDB(DWS)的过程化SQL语言能力
- 2021牛客寒假算法基础集训营3,签到题DGHIJ
- 七牛2015结姻大典,约吗?
- 一步之遥 c语言答案是多少,蓝桥杯之一步之遥-Go语言中文社区
- 斐讯k2修改dns服务器,斐讯K2固件修改的一些信息
- 统计学计算机app,统计学计算器
- 【无标题】123321
- 计算机内存读取写入原理是什么
- 如何在职场人际冲突中“立于不败之地”?
- abaqus帮助html,ABAQUS/CAE 常 问 界 面 操 作(转自SimWe仿真论坛
- 企业为什么要通过直播来做营销呢?
- 编程时java找不到文件_java.io.FileNotFoundException:系统找不到指定的文件
- snkrs暂时无法链接服务器,安卓snkrs一直出错了怎么解决 苹果snkrs无法连接服务器什么原因...
- 更改或者重置linux 系统 root 密码
- 在领悟到什么道理后,你的人生从此轻松了起来?
- 计算机报声音怎么弄,excel表格输入数据报语音-excel的语音报数怎么弄出来?
- 程序员必备网站和工具