[R] Column of probabilities
David Winsemius
dwinsemius at comcast.net
Fri Aug 26 22:58:10 CEST 2011
On Aug 26, 2011, at 2:35 PM, Jim Silverton wrote:
> H all,
>
> I have a 6 x 3 matrix. The last column is simply the sum of of the
> first two
> rows.
>
> x1 x2 x3
> 1 2 3
> 2 1 3
> 1 0 1
> 2 2 4
> 2 1 3
> 2 1 3
> 0 0 0
>
> I want to create a column of probabilities p, such that for each
> row, I want
> to find the probability of x1=k and x3 = n divided by the
> probability that
> x3 = n.
> So I should end up with a column of probabilities:
> 1/4, 3/4, 1/7, 1/7, 3/4, 3/4, 1/7
Probabilities of what? Those don't sum to 1 together or in any sub
aggregation I can construct.
--
David Winsemius, MD
West Hartford, CT
More information about the R-help
mailing list