Description Usage Arguments Details Value Author(s) See Also Examples

Calculates probability and conditional probability of events.

1 2 3 4 5 6 7 |

`x` |
a probability space or a subset of one. |

`event` |
logical expression indicating elements or rows of |

`given` |
either a subset of a probability space or a logical expression indicating elements or rows of |

`...` |
further arguments to be passed to or from other methods. |

This function calculates the probability of events or subsets of a given sample space.
Conditional probability is also implemented. In essence, the `Prob()`

function operates by summing the `probs`

column of its argument. It will find subsets on the fly if desired.

The `event`

argument is used to define a subset of `x`

, that is, the only outcomes used in the probability calculation will be those that are elements of `x`

and satisfy `event`

simultaneously. In other words, `Prob(x,event)`

calculates `Prob(intersect(x, subset(x, event)))`

. Consequently, `x`

should be the entire probability space in the case that `event`

is non-null.

There is some flexibility in the `given`

argument in that it can be either a data frame or it can be a logical expression that defines the subset. However, that flexibility is limited. In particular, if `given`

is a logical expression, then `event`

must also be specified (also a logical expression). And in this case, the argument `x`

should be the entire sample space, not a subset thereof.

A number in the interval `[0,1]`

.

G. Jay Kerns gkerns@ysu.edu.

1 2 3 |

```
Loading required package: combinat
Attaching package: 'combinat'
The following object is masked from 'package:utils':
combn
Loading required package: fAsianOptions
Loading required package: timeDate
Loading required package: timeSeries
Loading required package: fBasics
Loading required package: fOptions
Attaching package: 'prob'
The following objects are masked from 'package:base':
intersect, setdiff, union
[1] 0.1666667
[1] 0.198895
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.