How to find conditional probability 𝑷𝒓{𝒀 = 𝒚|𝑿 = 𝒙}

I have this Excel sheet(attached) and a want to find conditional probability ??{? = ?|? = 0}
my code is
[num]=xlsread('Book1.xlsx');
x=num(:,3); %picked c column X
y=num(:,4); %picked d column Y
Min and Max value of both column is from 0 to 23 respectively
How cant i find the vaue of Y if X=0 for entire column

回答(1 个)

y(x==0)

3 个评论

Faheem Rehman's answer moved here for consistency:
how can it done by bayes law
P(y/x=0) = P(x=0 / y=0-23) P(y=0-23) / P(x=0)
To be frank I have no experience with that though download the below file exchange and see if it helps:

请先登录,再进行评论。

类别

帮助中心File Exchange 中查找有关 MATLAB 的更多信息

标签

提问:

2018-12-22

评论:

2018-12-22

Community Treasure Hunt

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

Start Hunting!

Translated by