# how to calculate the evidence in a hybrid bayesian network

The wikipedia page on bayesian networks gives a clear example on bayesian network on discrete variables, its says that

My question is how this will differ if S is continuous? Or more generally how one calculates the marginal probability of a hybrid bayesian network?

In probability theory, marginalizing any discrete random variable $X$ requires one to sum over the probability mass function of the joint probabilities over all values of $X$. When $X$ is continuous, the distribution for $X$ will also be continuous, so to marginalize a continuous variable we can integrate the pdf with respect to $X$ over all values $(-\inf, \inf)$.
$$P(R=T \mid G = T) = \dfrac{\int P(G = T, s, R = T) ds}{\sum_{R \in {\{T, F}\}} \int P(G = T, s, R)ds}$$