class_docstr: Results for rank comparison
  
  This is a subclass of HolderTuple that includes results from intermediate
  computations, as well as methods for hypothesis tests, confidence intervals
  and summary.
class_docstr_tok: ["Results","for","rank","comparison","This","is","a","subclass","of","HolderTuple","that","includes","results","from","intermediate","computations",",","as","well","as","methods","for","hypothesis","tests",",","confidence","intervals","and","summary","."]
docstr: test for superiority probability
  
  H0: P(x1 > x2) + 0.5 * P(x1 = x2) = value
  
  The alternative is that the probability is either not equal, larger
  or smaller than the null-value depending on the chosen alternative.
  
  Parameters
  ----------
  value : float
      Value of the probability under the Null hypothesis.
  alternative : str
      The alternative hypothesis, H1, has to be one of the following
  
         * 'two-sided' : H1: ``prob - value`` not equal to 0.
         * 'larger' :   H1: ``prob - value > 0``
         * 'smaller' :  H1: ``prob - value < 0``
  
  Returns
  -------
  res : HolderTuple
      HolderTuple instance with the following main attributes
  
      statistic : float
          Test statistic for z- or t-test
      pvalue : float
          Pvalue of the test based on either normal or t distribution.
docstr_tok: ["test","for","superiority","probability","H0",":","P","(","x1",">","x2",")","+","0.5","*","P","(","x1","=","x2",")","=","value","The","alternative","is","that","the","probability","is","either","not","equal",",","larger","or","smaller","than","the","null-value","depending","on","the","chosen","alternative",".","Parameters","--","--","--","--","--","value",":","float","Value","of","the","probability","under","the","Null","hypothesis",".","alternative",":","str","The","alternative","hypothesis",",","H1",",","has","to","be","one","of","the","following","*","'two-sided","'",":","H1",":","``","prob","-","value","``","not","equal","to","0",".","*","'larger","'",":","H1",":","``","prob","-","value",">","0","``","*","'smaller","'",":","H1",":","``","prob","-","value","<","0","``","Returns","--","--","--","-","res",":","HolderTuple","HolderTuple","instance","with","the","following","main","attributes","statistic",":","float","Test","statistic","for","z-","or","t-test","pvalue",":","float","Pvalue","of","the","test","based","on","either","normal","or","t","distribution","."]
code: def test_prob_superior(self, value=0.5, alternative="two-sided"):
      """test for superiority probability
  
      H0: P(x1 > x2) + 0.5 * P(x1 = x2) = value
  
      The alternative is that the probability is either not equal, larger
      or smaller than the null-value depending on the chosen alternative.
  
      Parameters
      ----------
      value : float
          Value of the probability under the Null hypothesis.
      alternative : str
          The alternative hypothesis, H1, has to be one of the following
  
             * 'two-sided' : H1: ``prob - value`` not equal to 0.
             * 'larger' :   H1: ``prob - value > 0``
             * 'smaller' :  H1: ``prob - value < 0``
  
      Returns
      -------
      res : HolderTuple
          HolderTuple instance with the following main attributes
  
          statistic : float
              Test statistic for z- or t-test
          pvalue : float
              Pvalue of the test based on either normal or t distribution.
  
      """
  
      p0 = value  # alias
      # diff = self.prob1 - p0  # for reporting, not used in computation
      # TODO: use var_prob
      std_diff = np.sqrt(self.var / self.nobs)
  
      # corresponds to a one-sample test and either p0 or diff could be used
      if not self.use_t:
          stat, pv = _zstat_generic(
              self.prob1, p0, std_diff, alternative, diff=0
          )
          distr = "normal"
      else:
          stat, pv = _tstat_generic(
              self.prob1, p0, std_diff, self.df, alternative, diff=0
          )
          distr = "t"
  
      res = HolderTuple(
          statistic=stat, pvalue=pv, df=self.df, distribution=distr
      )
      return res
  
file_path: statsmodels/statsmodels/stats/nonparametric.py
imports: import numpy
  from scipy import stats
  from scipy.stats import rankdata
  from statsmodels.stats.base import HolderTuple
  from statsmodels.stats.weightstats import _tconfint_generic, _tstat_generic, _zconfint_generic, _zstat_generic
label_desc: Use image node_id 2 for calling the RankCompareResult obj's underlying member method code with example usage: obj.test_prob_superior(value, alternative) and returns: res