class_docstr: Prediction results
  
  Parameters
  ----------
  predicted_mean : {ndarray, Series, DataFrame}
      The predicted mean values
  var_pred_mean : {ndarray, Series, DataFrame}
      The variance of the predicted mean values
  dist : {None, "norm", "t", rv_frozen}
      The distribution to use when constructing prediction intervals.
      Default is normal.
  df : int, optional
      The degree of freedom parameter for the t. Not used if dist is None,
      "norm" or a callable.
  row_labels : {Sequence[Hashable], pd.Index}
      Row labels to use for the summary frame. If None, attempts to read the
      index of ``predicted_mean``
docstr: z- or t-test for hypothesis that mean is equal to value
  
  Parameters
  ----------
  value : array_like
      value under the null hypothesis
  alternative : str
      'two-sided', 'larger', 'smaller'
  
  Returns
  -------
  stat : ndarray
      test statistic
  pvalue : ndarray
      p-value of the hypothesis test, the distribution is given by
      the attribute of the instance, specified in `__init__`. Default
      if not specified is the normal distribution.
docstr_tok: ["z-","or","t-test","for","hypothesis","that","mean","is","equal","to","value","Parameters","--","--","--","--","--","value",":","array_like","value","under","the","null","hypothesis","alternative",":","str","'two-sided","'",",","'larger","'",",","'smaller'","Returns","--","--","--","-","stat",":","ndarray","test","statistic","pvalue",":","ndarray","p-value","of","the","hypothesis","test",",","the","distribution","is","given","by","the","attribute","of","the","instance",",","specified","in","`","__init__","`",".","Default","if","not","specified","is","the","normal","distribution","."]
code: def t_test(self, value=0, alternative="two-sided"):
      """
      z- or t-test for hypothesis that mean is equal to value
  
      Parameters
      ----------
      value : array_like
          value under the null hypothesis
      alternative : str
          'two-sided', 'larger', 'smaller'
  
      Returns
      -------
      stat : ndarray
          test statistic
      pvalue : ndarray
          p-value of the hypothesis test, the distribution is given by
          the attribute of the instance, specified in `__init__`. Default
          if not specified is the normal distribution.
      """
      # assumes symmetric distribution
      stat = (self.predicted_mean - value) / self.se_mean
  
      if alternative in ["two-sided", "2-sided", "2s"]:
          pvalue = self.dist.sf(np.abs(stat), *self.dist_args) * 2
      elif alternative in ["larger", "l"]:
          pvalue = self.dist.sf(stat, *self.dist_args)
      elif alternative in ["smaller", "s"]:
          pvalue = self.dist.cdf(stat, *self.dist_args)
      else:
          raise ValueError("invalid alternative")
      return stat, pvalue
  
file_path: statsmodels/statsmodels/tsa/base/prediction.py
imports: import numpy
  import pandas
  from scipy import stats
label_desc: Use image node_id 8 for calling the PredictionResults obj's underlying member method code with example usage: obj.t_test(value, alternative) and returns: stat,  pvalue