class_docstr: A class to compute confidence intervals and hypothesis tests involving
  mean, variance, kurtosis and skewness of a univariate random variable.
  
  Parameters
  ----------
  endog : 1darray
      Data to be analyzed
  
  Attributes
  ----------
  endog : 1darray
      Data to be analyzed
  
  nobs : float
      Number of observations
class_docstr_tok: ["A","class","to","compute","confidence","intervals","and","hypothesis","tests","involving","mean",",","variance",",","kurtosis","and","skewness","of","a","univariate","random","variable",".","Parameters","--","--","--","--","--","endog",":","1darray","Data","to","be","analyzed","Attributes","--","--","--","--","--","endog",":","1darray","Data","to","be","analyzed","nobs",":","float","Number","of","observations"]
docstr: Returns  -2 x log-likelihood 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)
docstr_tok: ["Returns","-2","x","log-likelihood","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",")"]
code: def test_var(self, sig2_0, return_weights=False):
      """
      Returns  -2 x log-likelihood 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)
      """
      self.sig2_0 = sig2_0
      mu_max = max(self.endog)
      mu_min = min(self.endog)
      llr = optimize.fminbound(
          self._opt_var, mu_min, mu_max, full_output=1
      )[1]
      p_val = chi2.sf(llr, 1)
      if return_weights:
          return llr, p_val, self.new_weights.T
      else:
          return llr, p_val
  
imports: import numpy
  from scipy import optimize
  from scipy.stats import chi2, skew, kurtosis
  from statsmodels.base.optimizer import _fit_newton
  import itertools
  from statsmodels.graphics import utils
label_desc: Use image node_id 4 for calling the DescStatUV obj's underlying member method code with example usage: obj.test_var(sig2_0, return_weights) and returns: llr,  p_val,  self, llr,  p_val