Code covered by the BSD License  

Highlights from
pcond

Be the first to rate this file! 7 Downloads (last 30 days) File Size: 2.39 KB File ID: #25184

pcond

by Antonio Trujillo-Ortiz

 

31 Aug 2009 (Updated 31 Aug 2009)

Conditional probability.

| Watch this File

File Information
Description

Conditional probability is the probability of some event A, given the occurrence of some other event B. Conditional probability is written P(A|B), and is read 'the probability of A, given B'.

It is calculated as,

                    P(AB)
       P(A|B) = --------
                    P(B)

P(AB) is the probability of the intersection of the events.

Syntax: function x = pcond(a,b,c)
     
Inputs:
a - Event A data vector (option=1) or probability of event A (option~=1)
b - Event B data vector (option=1) or probability of event B (option~=1)
c - Option 1=data vectors (default), option ~1=probability values

Outputs:
- Ask you if you are interested to know if the events(sets) are independent or not
- Conditional probability

Required Products Statistics Toolbox
MATLAB release MATLAB 7 (R14)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Please login to add a comment or rating.
Updates
31 Aug 2009

It was added an appropriate format to cite this file.

Tag Activity for this File
Tag Applied By Date/Time
probability Antonio Trujillo-Ortiz 31 Aug 2009 13:43:11
conditional Antonio Trujillo-Ortiz 31 Aug 2009 13:43:11
conditional probability Antonio Trujillo-Ortiz 31 Aug 2009 15:04:03

Contact us at files@mathworks.com