tanszek:oktatas:techcomm:conditional_probability
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
tanszek:oktatas:techcomm:conditional_probability [2024/08/26 17:54] โ knehez | tanszek:oktatas:techcomm:conditional_probability [2024/10/13 17:27] (current) โ kissa | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ==== Conditional probability ==== | + | ===== Conditional probability |
- | How can we calculate the result in a case where two events are not independent. It means that, if one event occurs it will directly affect the probability for the other event? | + | === Non-independent |
- | If event A and B are those kind of complex events which will not exclude each other. In this case we have a so-called conditional probability (event A affects | + | How can we calculate the result when two events are not independent? |
- | Notation: \(p(A | B) \) | + | If events **A** and **B** are complex events that will not exclude each other, we have a so-called conditional probability |
- | In this case we mean the relative frequency which compares the sum of all probability to the probability of event B (probability of it's occurrance). | + | **Notation**: |
- | $$ p(A|B) = \frac{k_{AB}}{k_b} = \frac{\frac{k_{AB}}{k}}{\frac{k_{B}}{k_b}} = \frac{p(A \cap B)}{p(B)} $$ | + | In this case, we mean the relative frequency, which compares the sum of all probabilities to the probability of event B (the probability of its occurrence).ย |
+ | ย | ||
+ | $$ p(A|B) = \frac{k_{AB}}{k_b} = \frac{\frac{k_{AB}}{k}}{\frac{k_{B}}{k}} = \frac{p(A \cap B)}{p(B)} $$ | ||
So we can get to the conclusion: | So we can get to the conclusion: | ||
$$ p(A \cap B) = p(A|B) p(B) $$ | $$ p(A \cap B) = p(A|B) p(B) $$ | ||
+ | |||
+ | 1.) \( p(A \cap B) \): | ||
+ | This represents the probability that both events | ||
+ | A and B occur simultaneously, | ||
+ | |||
+ | 2.) \( p(A|B) \): This is the conditional probability of event A occurring given that event B has already occurred. It tells us how likely A s to happen under the condition that B has happened. | ||
+ | |||
+ | **What the Formula Says?** | ||
+ | |||
+ | The formula states that the probability of events **A** and **B** occurring together, is equal to the probability of B occurring multiplied by the probability of A occurring given that B has already occurred. | ||
+ | |||
+ | **Example 1**: | ||
+ | |||
+ | A manufacturer must produce a shaft with two critical dimensions: length (L) and diameter (D). Tolerances of \( L \pm \Delta \) and \( D \pm \Delta \) is allowed. After inspecting 180 components, the results are as follows: | ||
+ | |||
+ | |||
+ | ^ Measurement Result ^ Quantity ^ | ||
+ | | Faultless \((H)\) | 162 | | ||
+ | | The length ๐ฟ is faulty \((A)\) | 10 | | ||
+ | | The diameter ๐ท is faulty \((B)\) | 12 | | ||
+ | | Both dimensions are faulty \( ( A \cap B ) \) | 4 | | ||
+ | | Only the length ๐ฟ is faulty \((C)\) | 6 | | ||
+ | | Only the diameter ๐ท is faulty \((D)\) | 8 | | ||
+ | |||
+ | **Question 1**: What are the probabilities of events \(A\) and \(B\)? | ||
+ | |||
+ | The probability of the event " | ||
+ | |||
+ | $$ p(A) = \frac{10}{180} = 0.05555 $$ | ||
+ | |||
+ | The probability of the event " | ||
+ | |||
+ | $$ p(B) = \frac{12}{180} = 0.06666 $$ | ||
+ | |||
+ | **Question 2**: What is the probability that both dimensions are faulty? | ||
+ | |||
+ | $$ p(A \cap B) = \frac{4}{180} = 0.0222 $$ | ||
+ | |||
+ | **Question 3**: What is the probability that a shaft' | ||
+ | |||
+ | The conditional probability of both events occurring can be calculated using the definition: | ||
+ | |||
+ | $$ p(A \mid B) = \frac{\text{both dimensions are faulty}}{\text{diameter is faulty}} = \frac{4}{12} = 0.3333 $$ | ||
+ | |||
+ | Since this does not match with the product \( p(A) \cdot p(B)\), we can conclude that the two events are **not independent**! | ||
+ | |||
+ | Thus, the joint probability can also be calculated differently: | ||
+ | |||
+ | $$ p(A \cap B) = p(A \mid B) \cdot p(B) = 0.333 \cdot 0.0666 = 0.02222 $$ | ||
+ | |||
+ | The probability of event \(C\) is: | ||
+ | |||
+ | $$ p(C) = \frac{6}{180} = 0.0333 $$ | ||
+ | |||
+ | The probability of event \(D\) is: | ||
+ | |||
+ | $$ p(D) = \frac{8}{180} = 0.0444 $$ | ||
+ | |||
+ | **Question 4**: What is the probability of defective production? | ||
+ | |||
+ | $$ p(H) = \frac{180 - 162}{180} = \frac{18}{180} = 0.1 $$ | ||
+ | |||
+ | Alternatively, | ||
+ | |||
+ | $$ p(A \cup B) = p(A) + p(B) - p(A \cap B) = 0.0555 + 0.0666 - 0.0222 = 0.1 $$ | ||
+ | |||
+ | or | ||
+ | |||
+ | $$ p(A \cup B \cup E) = 0.0333 + 0.0444 + 0.0222 = 0.1 $$ | ||
+ | |||
+ | where \( E = A \cap B \) | ||
+ | |||
+ | |||
+ | **Example 2**: | ||
+ | Find the conditional probability of a machine breakdown given that preventive maintenance was performed. | ||
+ | |||
+ | We have the following information: | ||
+ | * The probability that the machine breaks down (Event A) is \( p(A) = 0.10 \) | ||
+ | * The probability that the machine undergoes preventive maintenance (Event B) is \( p(B) = 0.30 \) | ||
+ | * The probability that the machine both breaks down and has undergone preventive maintenance is \( p(A \cap B) = 0.015 \) | ||
+ | |||
+ | To calculate the conditional probability of the machine breaking down given that it underwent preventive maintenance, | ||
+ | |||
+ | $$ p(A|B) = \frac{p(A \cap B)}{p(B)} $$ | ||
+ | |||
+ | Substitute the values: | ||
+ | |||
+ | $$ p(A|B) = \frac{0.015}{0.30} $$ | ||
+ | |||
+ | Thus, the probability that the machine breaks down given that it underwent preventive maintenance is \( p(A|B) = 0.05 \), or 5%. | ||
+ | |||
+ | |||
+ |
tanszek/oktatas/techcomm/conditional_probability.1724694856.txt.gz ยท Last modified: 2024/08/26 17:54 by knehez