频率直方图求样本方差的方差怎么求

根据频率分布直方图求平均数,方差,中位数如何用频率分布直方图求方差,中位数,平均数,众数
我的图书馆
根据频率分布直方图求平均数,方差,中位数如何用频率分布直方图求方差,中位数,平均数,众数
平均数则是每组频率的中间值乘频数再相加平均数=4(3*0.02 7*0.08 11*0.09 17*0.03)=8.48方差=1/5[(3-8.48)^2 (7-8.48)^2 (11-8.48)^2 (15-8.48)^2 (19-8.48)^2]=38.3504中位数就是频率分布直方图面积的一半所对应的值即左右面积和为0.5就行了.设中位数为9 x则4*(0.02 0.08 x)=0.5 x=0.025 所以中位数为9.025众数就是频率最高的中间值就是11您的满意是我继续的动力!
TA的最新馆藏[转]&
喜欢该文的人也喜欢用样本估计总体(频率分布直方图、平均数、方差等)_百度文库
两大类热门资源免费畅读
续费一年阅读会员,立省24元!
用样本估计总体(频率分布直方图、平均数、方差等)
阅读已结束,下载文档到电脑
想免费下载本文?
定制HR最喜欢的简历
下载文档到电脑,方便使用
还剩5页未读,继续阅读
定制HR最喜欢的简历
你可能喜欢MATLAB画带均值和方差的直方图,实现多个算法实验结果比较
输入数据:5种方法在8个数据集上的测试结果数据
y = [0.4 0.8 0.7771
0.9 0.8 0.4797
0.8 0.5 0.3988
0.4 0.7 0.6728
0.7 0.4 0.6645
0.5 0.8 0.2993
0.9 0.5 0.5563
0.1 0.646 0.7];
errY = [0. 0.3 0.1657
0.9 0.8 0.0959
0.1 0.4 0.041
0.3 0.9 0.0074
0.9 0.4 0.0058
0.4 0.7 0.0061
0.9 0.6 0.0024
0.2 0.5 0.0039];
在matlab 命令窗口输入:
&& h = barwitherr(errY, y);% Plot with errorbars
set(gca,'XTickLabel',{'Pyrimidines','Machine','Boston','Abalone','Bank','Coputer','California','Census'})
&ylabel('Mean zero-one error')
&set(gca,'FontSize',12)
建立barwitherr.m文件,画带期望和方差的直方图
%**************************************************************************
% & This is a simple
extension of the bar plot to include error bars.
% & is called in
exactly the same way as bar but with an extra input
% & parameter "errors"
passed first.
Parameters:
% & errors - the errors
to be plotted (extra dimension used if assymetric)
% & varargin -
parameters as passed to conventional bar plot
% & See bar and
errorbar documentation for more details.
% & [hBar hErrorbar] =
barwitherr(..) returns a vector of handles to
& & &barseries
(hBar) and error bar (hErrorbar) objects
% & Symmetric
% & y = randn(3,4);
& % random y values (3 groups of 4
parameters)&
% & errY = 0.1.*y;
& &% 10% error
barwitherr(errY, y);% Plot with errorbars
set(gca,'XTickLabel',{'Group A','Group B','Group C'})
% & legend('Parameter
1','Parameter 2','Parameter 3','Parameter 4')
% & ylabel('Y
set(h(1),'FaceColor','k');
% & Asymmetric
% & y = randn(3,4);
& % random y values (3 groups of 4
parameters)
% & errY =
zeros(3,4,2);
% & errY(:,:,1) =
0.1.*y; & % 10% lower error
% & errY(:,:,2) =
0.2.*y; & % 20% upper error
% & barwitherr(errY,
y); & &% Plot with
set(gca,'XTickLabel',{'Group A','Group B','Group C'})
% & legend('Parameter
1','Parameter 2','Parameter 3','Parameter 4')
% & ylabel('Y
% & Notes:
% & Ideally used for
group plots with non-overlapping bars because it
% & will always plot in
bar centre (so can look odd for over-lapping
% & and for stacked
plots the errorbars will be at the original y value
% & not the stacked
value so again odd appearance as is.
% & The data may not be
in ascending order. &Only an issue if x-values
% & passed to the fn in
which case their order must be determined
% & correctly position
the errorbars.
% & 24/02/2011
&Martina F. Callaghan &
% & 12/08/2011
&Martina F. Callaghan &
&Updated for random x-values
% & 24/10/2011
&Martina F. Callaghan &
&Updated for asymmetric errors
% & 15/11/2011
&Martina F. Callaghan &
&Fixed bug for assymetric errors
& & vector plots
% & 14/06/2013
&Martina F. Callaghan &
&Returning handle as recommended by
& & Eric (see submission
% & 08/07/2013
&Martina F. Callaghan &
&Only return handle if requested.
% & 18/07/2013
&Martina F. Callaghan &
&Bug fix for single group data
& & allows assymetric
& & Also removed dot from display
& & per Charles Colin comment.
& & handle can be returned to
& & appearance.
% & 27/08/2013
&Martina F. Callaghan &
&Ensuring errors are always stored
& & as lowerErrors and
upperErrors even
& & if symmetric.
% & 29/10/2014
&Martina F. Callaghan &
&Updated for 2014b graphics
%**************************************************************************
function varargout = barwitherr(errors,varargin)
% Check how the function has been called based on requirements
if nargin & 3
& & % This is the same as
calling bar(y)
& & values =
varargin{1};
& & xOrder =
1:size(values,1);
& & % This means extra
parameters have been specified
& & if isscalar(varargin{2})
|| ischar(varargin{2})
& % It is a width / property so the y values are
still varargin{1}
& values = varargin{1};
& xOrder = 1:size(values,1);
& % x-values have been specified so the y values
are varargin{2}
& % If x-values have been specified, they could be
in a random order,
& % get their indices in ascending order for use
with the bar
& % locations which will be in ascending
& values = varargin{2};
& [tmp xOrder] = sort(varargin{1});
% If an extra dimension is supplied for the errors then they
% assymetric split out into upper and lower:
if ndims(errors) == ndims(values)+1
& & lowerErrors =
errors(:,:,1);
& & upperErrors =
errors(:,:,2);
elseif isvector(values)~=isvector(errors)
& & lowerErrors =
errors(:,1);
& & upperErrors =
errors(:,2);
& & lowerErrors =
& & upperErrors =
% Check that the size of "errors" corresponsds to the size of
the y-values.
% Arbitrarily using lower errors as indicative.
if any(size(values) ~= size(lowerErrors))
& & error('The values and
errors have to be the same length')
[nRows nCols] = size(values);
handles.bar = bar(varargin{:}); % standard implementation of
hBar = handles.
if nRows & 1
& & hErrorbar =
zeros(1,nCols);
& & for col = 1:nCols
& % Extract the x location data needed for the
errorbar plots:
& if verLessThan('matlab', '8.4')
& & & % Original
get(get(handles.bar(col),'children'),'xdata');
& & & % New
&handles.bar(col).XData +
[handles.bar(col).XOffset];
& % Use the mean x values to call the standard
& % errorbars will now be
these are in ascending
& % order so use xOrder to ensure y values and
errors are too:
& hErrorbar(col) = errorbar(mean(x,1),
values(xOrder,col), lowerErrors(xOrder,col), upperErrors(xOrder,
col), '.k');
& set(hErrorbar(col), 'marker', 'none')
& & if verLessThan('matlab',
& % Original graphics:
get(get(handles.bar,'children'),'xdata');
&% New graphics:
&x = &handles.bar.XData +
[handles.bar.XOffset];
& & hErrorbar =
errorbar(mean(x,1), values, lowerErrors, upperErrors, '.k');
& & set(hErrorbar, 'marker',
switch nargout
& & case 1
& varargout{1} = hB
& & case 2
& varargout{1} = hB
& varargout{2} = hE
已投稿到:
以上网友发言只代表其个人观点,不代表新浪网的观点或立场。高中数学条形图算平均数,方差怎么算_百度知道
高中数学条形图算平均数,方差怎么算
我有更好的答案
平均数=方格面积*组中值(方格下方左右两数平均值)高中用频率分布直方图不求方差
采纳率:100%
为您推荐:
其他类似问题
方差的相关知识
换一换
回答问题,赢新手礼包
个人、企业类
违法有害信息,请在下方选择后提交
色情、暴力
我们会通过消息、邮箱等方式尽快将举报结果通知您。如何根据频率分布直方图算平均数_百度知道
如何根据频率分布直方图算平均数
我有更好的答案
频率直方图中是没有样本数据的.在某一个分组里,分布在这个分组的样本数据没法找得出来,然后也分布不均匀,所以就用这个组的中点的横坐标来表示这个分组的样本数据的平均值,而每一个小长方形的面积是表示相应的频率,(相当于相应数据的百分比)所以平均数等于每个小长方形的面积乘以相应的分组的底边中点横坐标的之和.
采纳率:96%
来自团队:
为您推荐:
其他类似问题
频率分布直方图的相关知识
换一换
回答问题,赢新手礼包
个人、企业类
违法有害信息,请在下方选择后提交
色情、暴力
我们会通过消息、邮箱等方式尽快将举报结果通知您。}

我要回帖

更多关于 根据频率直方图求方差 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信