rvmean                  package:rv                  R Documentation

_E_x_p_e_c_t_a_t_i_o_n _o_f _a _R_a_n_d_o_m _V_a_r_i_a_b_l_e

_D_e_s_c_r_i_p_t_i_o_n:

     'rvmean'

_U_s_a_g_e:

       rvmean(x, ...)

_A_r_g_u_m_e_n_t_s:

       x: an rv object

     ...: further arguments passed to 'mean'

_D_e_t_a_i_l_s:

     'rvmean' computes the means of the simulations  of all individual
     components of a random vector (rv) object.

     'E' is an alias for 'rvmean', standing for ``Expectation.''

     'Pr' is another alias for 'rvmean', standing for ``Probability
     of''; suggested to be used  when the argument is a logical
     statement involving random variables (that is, a description of an
     event such as 'x>0' or 'x>y'). Then 'Pr(x>0)' gives the
     probability of the event ``x>0". The statement 'x>0' returns a
     Bernoulli (indicator) random variable object (having 1/0 or
     TRUE/FALSE values) and the expectation of such variable is just
     the probability of the  event where the indicator is one.

_V_a_l_u_e:

     A _numerical_ vector with the same dimension as 'x'.

_A_u_t_h_o_r(_s):

     Jouni Kerman kerman@stat.columbia.edu <URL:
     http://www.stat.columbia.edu/~kerman>

_R_e_f_e_r_e_n_c_e_s:

     Kerman, Jouni and Gelman, Andrew. Manipulating and Summarizing
     Posterior Simulations Using Random Variable Objects. Technical
     report, Columbia University, New York.

_S_e_e _A_l_s_o:

     'mean.rv': distribution of the arithmetic mean of a vector;
     'rvmin', 'rvmax', 'rvmedian',  'link{rvvar}', 'rvsd'.

_E_x_a_m_p_l_e_s:

       x <- rvnorm(mean=(1:10)/5, sd=1)
       rvmean(x)  # means of the 10 components
       E(x)       # same as rvmean(x)
       Pr(x>1)    # probabilities that each component is >1.

