Hello im having some issue with coding union probability in R as i am quite new to the language

```p(a) = 0.30
p(b)=0.45
p(c)= .40
```

I am trying to find the p(at least one of three items have been purchased) which is p(AuBuC)

ive tried using dbinom but have recently learned that it only works when all three have the some probability

union(A,B) doesn't seem to work either:

``` A=0.30
> B=0.45
> C=0.40
> union(A,B,C)
```

Error in union(A, B, C) : unused argument (C)

any ideas, tips or pointers?

Apr 4, 2022 537 views

## 1 answer to this question.

You can try this if a, b, and c are mutually independent.

```1-prod(1-c(pa,pb,pc))
```

Use simple formula in R and this might help you to figure out the solution.

• 6,000 points

## Transition matrix to have percentages instead of default probability - Markov chain

While using Markov chain, is it possible ...READ MORE

## Leela Chess Zero: how large is the probability vector in the output layer?

The next move's probability vector (called the ...READ MORE

## Choose specific number with probability

Examine the sample function. set.seed(1) sample(c(0,1), size=12, replace=TRUE, prob=c(0.2,0.8)) 1 ...READ MORE

## R: Calculate and interpret odds ratio in logistic regression

A logit, or the log of the ...READ MORE

## Calculate Z-Score from Probability Value - R programming

It's named qnorm qnorm(p=0.841344746068543) Output 1 The following family of functions ...READ MORE

## Calculate the probability in R for sum of two dice rolls

By converting the outer values to a ...READ MORE

## Big Data transformations with R

Dear Koushik, Hope you are doing great. You can ...READ MORE