% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/inference.R
\name{risk_prob}
\alias{risk_prob}
\title{Bayesian Inference for Risk Probability.}
\usage{
risk_prob(cause_probs, risks_given_causes, risks_given_not_causes)
}
\arguments{
\item{cause_probs}{A vector of probabilities for each root cause 'C_i'.}

\item{risks_given_causes}{A vector of conditional probabilities of the risk event 'R' given each cause 'C_i'.}

\item{risks_given_not_causes}{A vector of conditional probabilities of the risk event 'R' given not each cause 'C_i'.}
}
\value{
The function returns a numeric value for the probability of risk event 'R'.
}
\description{
This function calculates the overall probability of a risk event 'R' occurring
based on the probabilities of multiple root causes and their associated conditional probabilities.
}
\examples{
cause_probs <- c(0.3, 0.2)
risks_given_causes <- c(0.8, 0.6)
risks_given_not_causes <- c(0.2, 0.4)
risk_prob_value <- risk_prob(cause_probs, risks_given_causes, risks_given_not_causes)
print(risk_prob_value)

}
\references{
Damnjanovic, Ivan, and Kenneth Reinschmidt. Data analytics for engineering and
construction project risk management. No. 172534. Cham, Switzerland: Springer, 2020.
}
