DescStatUV.test_var()

statsmodels.emplike.descriptive.DescStatUV.test_var

DescStatUV.test_var(sig2_0, return_weights=False) [source]

Returns -2 x log-likelihoog ratio and the p-value for the hypothesized variance

Parameters:

sig2_0 : float

Hypothesized variance to be tested

return_weights : bool

If True, returns the weights that maximize the likelihood of observing sig2_0. Default is False

Returns:

test_results : tuple

The log-likelihood ratio and the p_value of sig2_0

Examples

>>> import numpy as np
>>> import statsmodels.api as sm
>>> random_numbers = np.random.standard_normal(1000)*100
>>> el_analysis = sm.emplike.DescStat(random_numbers)
>>> hyp_test = el_analysis.test_var(9500)

© 2009–2012 Statsmodels Developers
© 2006–2008 Scipy Developers
© 2006 Jonathan E. Taylor
Licensed under the 3-clause BSD License.
http://www.statsmodels.org/stable/generated/statsmodels.emplike.descriptive.DescStatUV.test_var.html

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部