def bayes_mvs(data, alpha=0.9):
 (m, v, s) = mvsdist(data)
 if ((alpha >= 1) or (alpha <= 0)):
  raise ValueError(('0 < alpha < 1 is required, but alpha=%s was given.' % alpha))
 m_res = Mean(m.mean(), m.interval(alpha))
 v_res = Variance(v.mean(), v.interval(alpha))
 s_res = Std_dev(s.mean(), s.interval(alpha))
 return (m_res, v_res, s_res)

def bayes_mvs ( data , alpha = 0.9 ) : ( m , v , s ) = mvsdist ( data ) if ( ( alpha >= 1 ) or ( alpha <= 0 ) ) : raise ValueError ( ( '0 < alpha < 1 is required, but alpha=%s was given.' % alpha ) ) m_res = Mean ( m . mean ( ) , m . interval ( alpha ) ) v_res = Variance ( v . mean ( ) , v . interval ( alpha ) ) s_res = Std_dev ( s . mean ( ) , s . interval ( alpha ) ) return ( m_res , v_res , s_res )
bayesian confidence intervals for the mean .