How to calculate conditional probability?

Given two vectors X and Y how can we calculate P(X/Y). I need it for the Naive Bayes Classification Algorithm. Note: X and Y can have two or more same elements. For example X=[1 1 2 3 4 4 2 3 5] Y=[ 3 3 4 1 2 2 2 7 8]
Thanks

1 件のコメント

Daniel Shub
Daniel Shub 2011 年 11 月 9 日
You cannot. You need more than just independent observations of X and Y, you need paired observations of X and Y together, in other words something like a matrix.

サインインしてコメントする。

回答 (0 件)

カテゴリ

質問済み:

2011 年 11 月 9 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by