Siksha Sarovar

Siksha Sarovar (sikshasarovar.com) is a free educational web application that helps students in India learn programming and prepare for academic and competitive exams. The platform offers structured coding courses (C, C++, Python, Java, HTML, CSS, PHP, Power BI, AI, Machine Learning, Data Science), complete university curriculum notes for BCA/MCA students with previous year question papers, Class 10 and Class 12 CBSE/HBSE school notes, and dedicated preparation material for SSC, UPSC, Banking, Railway and other government exams. Browsing the site is completely free and requires no account. Users may optionally sign in with Google solely to save their learning progress, quiz scores and personal preferences across devices.

Privacy Policy | Terms of Service | Contact Siksha Sarovar | About Siksha Sarovar

v4.0.9 · PWA
Siksha Sarovar logo
Siksha Sarovar
Your Learning Universe

Siksha Sarovar is a free e-learning platform for coding courses, BCA university notes and competitive exam preparation. Optional Google sign-in saves your learning progress across devices.

Initializing knowledge base…
Compiling modules 0%

Independence and 2D Example

Lesson 11 of 11 in the free Probability and Statistics- BCA-DS-23-204 notes on Siksha Sarovar, written by Rohit Jangra.

5.4 Independence of Random Variables

Concept: $X$ and $Y$ are independent if the occurrence of one does not affect the probabilities of the other.

Mathematical Condition: $X$ and $Y$ are independent if and only if: $$ f(x,y) = f_X(x) \cdot f_Y(y) $$ (For all values of $x$ and $y$).

---

Comprehensive Example (2D Variables)

Scenario: A bag contains 2 Red balls and 3 Blue balls. Two balls are drawn without replacement. Let $X$ = Number of Red balls drawn. Let $Y$ = Number of Blue balls drawn.

Joint Table:

$Y$ (Blue) $\downarrow$ / $X$ (Red) $\rightarrow$012Marginal ($P(Y)$)
0000.100.10
100.6000.60
20.30000.30
Marginal ($P(X)$)0.300.600.101.00

Step 2: Find Marginal Distributions

  • Marginal $P(X)$: Sum the columns.
  • $P(X=0) = 0.30, P(X=1) = 0.60, P(X=2) = 0.10$
  • Marginal $P(Y)$: Sum the rows.
  • $P(Y=0) = 0.10, P(Y=1) = 0.60, P(Y=2) = 0.30$

Step 3: Check Independence Are $X$ and $Y$ independent? Check if $P(X=1, Y=1) = P(X=1) \cdot P(Y=1)$.

  • Joint: $P(1,1) = 0.60$
  • Product of Marginals: $P(X=1) \times P(Y=1) = 0.60 \times 0.60 = 0.36$.
  • Since $0.60 \neq 0.36$, the variables are Dependent.

Step 4: Conditional Probability Find the probability of getting 1 Red ball given that we know we got 1 Blue ball. $$ P(X=1 | Y=1) = \frac{P(X=1, Y=1)}{P(Y=1)} = \frac{0.60}{0.60} = 1.0 $$ (Interpretation: If you know you drew exactly 1 Blue ball, you are 100% certain the other ball was Red in this context).