Conditional probability table: Difference between revisions

Content deleted Content added
top: more generally
top: more generally
Line 1:
{{Refimprove|date=December 2013}}
 
In [[statistics]], the '''conditional probability table (CPT)''' is defined for a set of discrete and mutually [[independence (probability)|dependent]] [[random variable]]s to demonstrate [[conditional probability]] of a single variable with respect to the others. For example, assume there are three random variables <math>x_1,x_2, x_3</math> where each has <math>K</math> states. Then, the conditional probability table of <math>x_1</math> provides the conditional probability values <math>P(x_1=a_k\mid x_2,x_3)</math> – where the vertical bar <math>|</math> means “given the values of” – for each of the ''K'' possible values <math>a_k</math> of the variable <math>x_1</math> and for each possible combination of values of <math>x_2,\, x_3.</math> This table has <math>K^3</math> cells. In general, for <math>M</math> variables <math>x_1,x_2,\ldots,x_M</math> with <math>KK_i</math> states for each ofvariable them<math>x_i,</math> the CPT for any one of them has size&nbsp;the number of cells equal to the product <math>K^MK_1K_2\cdots K_M.</math><ref name=murphybook>{{cite book|last=Murphy|first=KP|title=Machine learning: a probabilistic perspective|year=2012|publisher=The MIT Press}}</ref>
 
A conditional probability table can be put into [[matrix (mathematics)|matrix]] form. As an example with only two variables, the values of <math>P(x_1=a_k\mid x_2=b_j)=T_{kj},</math> with ''k'' and ''j'' ranging over ''K'' values, create a ''K''×''K'' matrix. This matrix is a [[stochastic matrix]] since the columns sum to 1; i.e. <math>\sum_k T_{kj} = 1</math> for all ''j''. For example, suppose that two binary variables ''x'' and ''y'' have the [[joint probability distribution]] given in this table: