Probability basics
Statistics · 13 questions
Short notes
Key idea
Probability is a number from 0 (impossible) to 1 (certain). Most questions use a few rules: complement, "and", "or", and conditional probability.
Syntax
- Complement: P(not A) = 1 − P(A).
- And, independent: P(A and B) = P(A) × P(B).
- Or: P(A or B) = P(A) + P(B) − P(A and B).
- Conditional: P(A | B) = P(A and B) / P(B).
- Bayes: P(A | B) = P(B | A) × P(A) / P(B).
- Expected value: sum of value × probability.
Example
1% of transactions are fraud. A check flags 90% of frauds and 5% of normal ones. If a transaction is flagged, the chance it's fraud = 0.009 / (0.009 + 0.0495) ≈ 15%. Most flags are false alarms because fraud is rare.
Traps
- P(A | B) is not P(B | A). "Most frauds are flagged" doesn't mean "most flags are fraud".
- Only multiply for independent events; drawing without replacement changes the odds.
- "At least one" is easiest as 1 − P(none).
- Past results don't change a fair coin: after five heads, the next toss is still 50/50.
Want the full lesson with step-by-step examples, a project and a certificate? Statistics course, ₹120 →
- Question 1easy
P(A) = 0.5, P(B) = 0.4, and P(A and B) = 0.2. What is P(A or B)?
- Question 2medium
Which describes P(UPI | delivered)?
- Question 3hard
1% of transactions are fraud. A fraud check flags 90% of frauds, and wrongly flags 5% of normal transactions. Roughly what share of flagged transactions are actually fraud?
- Question 4easy
41 of the 80 orders are delivered. What does this print?
print((orders["status"] == "delivered").mean())
- Question 5medium
What does this print?
upi = orders[orders["payment_method"] == "UPI"] print(round((upi["status"] == "delivered").mean(), 3))
Probability basics
Probability basics
Probability basics
Probability basics
Probability basics
8 more questions on this topic, with hints, and tests
Sign up free for 21 days of every question and test.