#### Overview of this book

Learning Bayesian Models with R
Credits
www.PacktPub.com
Preface
Free Chapter
Introducing the Probability Theory
The R Environment
Introducing Bayesian Inference
Machine Learning Using Bayesian Inference
Bayesian Regression Models
Bayesian Classification Models
Bayesian Models for Unsupervised Learning
Bayesian Neural Networks
Bayesian Modeling at Big Data Scale
Index

## Exercises

1. By using the definition of conditional probability, show that any multivariate joint distribution of N random variables has the following trivial factorization:
2. The bivariate normal distribution is given by:

Here:

By using the definition of conditional probability, show that the conditional distribution can be written as a normal distribution of the form where and .

3. By using explicit integration of the expression in exercise 2, show that the marginalization of bivariate normal distribution will result in univariate normal distribution.

4. In the following table, a dataset containing the measurements of petal and sepal sizes of 15 different Iris flowers are shown (taken from the Iris dataset, UCI machine learning dataset repository). All units are in cms:

Sepal Length

Sepal Width

Petal Length

Petal Width

Class of Flower

5.1

3.5

1.4

0.2

Iris-setosa

4.9

3

1.4

0.2

Iris-setosa

4.7

3.2

1.3

0.2

Iris-setosa

4.6

3.1

1.5

0.2

Iris-setosa

5

3.6

1.4

0.2

Iris-setosa

7

3.2

4.7

1.4

Iris-versicolor

6.4

3.2

4.5

1.5

Iris-versicolor

6.9

3.1

4.9

1.5

Iris-versicolor

5.5

2.3

4

1.3

Iris-versicolor

6.5

2.8

4.6

1.5

Iris-versicolor

6.3

3.3

6

2.5

Iris-virginica

5.8

2.7

5.1

1.9

Iris-virginica

7.1

3

5.9

2.1

Iris-virginica

6.3

2.9

5.6

1.8

Iris-virginica

6.5

3

5.8

2.2

Iris-virginica

1. What is the probability of finding flowers with a sepal length more than 5 cm and a sepal width less than 3 cm?

2. What is the probability of finding flowers with a petal length less than 1.5 cm; given that petal width is equal to 0.2 cm?

3. What is the probability of finding flowers with a sepal length less than 6 cm and a petal width less than 1.5 cm; given that the class of the flower is Iris-versicolor?