Concrete Mathematics, Probability & StatisticsConcrete Mathematics, Probability & Statistics

Sums, counting, chance, and data — the math tools that BUET loves to test. Sums, counting, chance আর data — এই math tools গুলো BUET exam-এ খুব বেশি আসে।

1. Sums and Recurrences1. Sums and Recurrences

Sigma notationSigma notation

A sum of many terms is written with the Greek letter sigma \( \Sigma \). It is just a short way to write a long addition.

অনেকগুলো term-এর sum লেখা হয় Greek letter sigma \( \Sigma \) দিয়ে। এটা আসলে লম্বা addition লেখার একটা short way।

\[ \sum_{k=1}^{n} a_k = a_1 + a_2 + a_3 + \dots + a_n \]
Example: \( \sum_{k=1}^{4} k^2 = 1^2 + 2^2 + 3^2 + 4^2 = 1 + 4 + 9 + 16 = 30 \). The letter \(k\) is the index. It runs from 1 to 4.
Example: \( \sum_{k=1}^{4} k^2 = 1^2 + 2^2 + 3^2 + 4^2 = 1 + 4 + 9 + 16 = 30 \)। এখানে \(k\) হলো index। এটা 1 থেকে 4 পর্যন্ত চলে।

Arithmetic seriesArithmetic series

In an arithmetic series, each term grows by the same amount \(d\) (the common difference). First term is \(a\), number of terms is \(n\).

Arithmetic series-এ প্রতিটা term একই পরিমাণ \(d\) (common difference) করে বাড়ে। প্রথম term \(a\), আর term সংখ্যা \(n\)।

\[ S_n = \frac{n}{2}\big(2a + (n-1)d\big) = \frac{n}{2}(\text{first} + \text{last}) \]
Example: Find \( 5 + 8 + 11 + \dots + 50 \).
Here \(a = 5\), \(d = 3\), last term \(= 50\). Number of terms: \( n = \frac{50 - 5}{3} + 1 = 16 \).
Sum \( = \frac{16}{2}(5 + 50) = 8 \times 55 = 440 \).
Example: \( 5 + 8 + 11 + \dots + 50 \) বের করো।
এখানে \(a = 5\), \(d = 3\), last term \(= 50\)। Term সংখ্যা: \( n = \frac{50 - 5}{3} + 1 = 16 \)।
Sum \( = \frac{16}{2}(5 + 50) = 8 \times 55 = 440 \)।

Geometric seriesGeometric series

In a geometric series, each term is multiplied by the same ratio \(r\).

Geometric series-এ প্রতিটা term একই ratio \(r\) দিয়ে multiply হয়।

\[ S_n = a\,\frac{r^n - 1}{r - 1} \quad (r \neq 1), \qquad S_\infty = \frac{a}{1 - r} \quad (|r| < 1) \]
Example: Find \( 2 + 6 + 18 + 54 + 162 \).
Here \(a = 2\), \(r = 3\), \(n = 5\). Sum \( = 2 \cdot \frac{3^5 - 1}{3 - 1} = 2 \cdot \frac{242}{2} = 242 \).
Example: \( 2 + 6 + 18 + 54 + 162 \) বের করো।
এখানে \(a = 2\), \(r = 3\), \(n = 5\)। Sum \( = 2 \cdot \frac{3^5 - 1}{3 - 1} = 2 \cdot \frac{242}{2} = 242 \)।
Example (infinite): \( 1 + \frac{1}{2} + \frac{1}{4} + \frac{1}{8} + \dots = \frac{1}{1 - \frac{1}{2}} = 2 \). The sum never passes 2.
Example (infinite): \( 1 + \frac{1}{2} + \frac{1}{4} + \frac{1}{8} + \dots = \frac{1}{1 - \frac{1}{2}} = 2 \)। Sum কখনো 2 পার হয় না।

Standard sum formulasStandard sum formulas

\[ \sum_{k=1}^{n} k = \frac{n(n+1)}{2}, \qquad \sum_{k=1}^{n} k^2 = \frac{n(n+1)(2n+1)}{6}, \qquad \sum_{k=1}^{n} k^3 = \left(\frac{n(n+1)}{2}\right)^{2} \]
Example: For \(n = 10\):
\( \sum k = \frac{10 \cdot 11}{2} = 55 \),   \( \sum k^2 = \frac{10 \cdot 11 \cdot 21}{6} = 385 \),   \( \sum k^3 = 55^2 = 3025 \).
Nice check: sum of cubes is always the square of the sum of the first powers.
Example: \(n = 10\)-এর জন্য:
\( \sum k = \frac{10 \cdot 11}{2} = 55 \),   \( \sum k^2 = \frac{10 \cdot 11 \cdot 21}{6} = 385 \),   \( \sum k^3 = 55^2 = 3025 \)।
সুন্দর check: cubes-এর sum সবসময় প্রথম powers-এর sum-এর square।

Telescoping sumsTelescoping sums

In a telescoping sum, each term splits into two parts. The middle parts cancel each other. Only the first and last parts stay. Like a telescope folding in.

Telescoping sum-এ প্রতিটা term দুই ভাগে ভাগ হয়। মাঝের part-গুলো একে অপরকে cancel করে দেয়। শুধু প্রথম আর শেষ part থাকে। ঠিক যেন একটা telescope ভাঁজ হয়ে যাচ্ছে।

Example: Find \( \sum_{k=1}^{n} \frac{1}{k(k+1)} \).
Split: \( \frac{1}{k(k+1)} = \frac{1}{k} - \frac{1}{k+1} \).
Sum \( = \left(1 - \frac{1}{2}\right) + \left(\frac{1}{2} - \frac{1}{3}\right) + \dots + \left(\frac{1}{n} - \frac{1}{n+1}\right) \).
Everything in the middle cancels. Answer \( = 1 - \frac{1}{n+1} = \frac{n}{n+1} \).
Check with \(n = 3\): \( \frac{1}{2} + \frac{1}{6} + \frac{1}{12} = \frac{6+2+1}{12} = \frac{9}{12} = \frac{3}{4} \). Formula gives \( \frac{3}{4} \). Correct.
Example: \( \sum_{k=1}^{n} \frac{1}{k(k+1)} \) বের করো।
ভাগ করো: \( \frac{1}{k(k+1)} = \frac{1}{k} - \frac{1}{k+1} \)।
Sum \( = \left(1 - \frac{1}{2}\right) + \left(\frac{1}{2} - \frac{1}{3}\right) + \dots + \left(\frac{1}{n} - \frac{1}{n+1}\right) \)।
মাঝের সব cancel হয়ে যায়। Answer \( = 1 - \frac{1}{n+1} = \frac{n}{n+1} \)।
\(n = 3\) দিয়ে check: \( \frac{1}{2} + \frac{1}{6} + \frac{1}{12} = \frac{9}{12} = \frac{3}{4} \)। Formula দেয় \( \frac{3}{4} \)। ঠিক আছে।

Solving simple recurrencesSimple recurrence solve করা

A recurrence defines a value using earlier values. Example: \( T(n) = T(n-1) + n \). The easiest method is unfolding (also called iteration): keep replacing until you see a pattern, then close the sum.

Recurrence মানে আগের value দিয়ে নতুন value define করা। যেমন: \( T(n) = T(n-1) + n \)। সবচেয়ে সহজ method হলো unfolding (iteration-ও বলে): বারবার replace করতে থাকো যতক্ষণ না pattern দেখা যায়, তারপর sum-টা close করো।

Example 1: Solve \( T(n) = T(n-1) + n \), with \( T(0) = 0 \).
Unfold: \( T(n) = T(n-2) + (n-1) + n = T(n-3) + (n-2) + (n-1) + n = \dots \)
After going all the way down: \( T(n) = 0 + 1 + 2 + \dots + n = \frac{n(n+1)}{2} \).
Check: \( T(3) = T(2) + 3 = (T(1) + 2) + 3 = (1) + 2 + 3 = 6 = \frac{3 \cdot 4}{2} \). Correct.
Example 1: \( T(n) = T(n-1) + n \), \( T(0) = 0 \) solve করো।
Unfold: \( T(n) = T(n-2) + (n-1) + n = T(n-3) + (n-2) + (n-1) + n = \dots \)
একদম নিচে নামলে: \( T(n) = 0 + 1 + 2 + \dots + n = \frac{n(n+1)}{2} \)।
Check: \( T(3) = 1 + 2 + 3 = 6 = \frac{3 \cdot 4}{2} \)। ঠিক আছে।
Example 2 (Tower of Hanoi): \( h(n) = 2h(n-1) + 1 \), \( h(1) = 1 \).
Compute small cases: \( h(1)=1,\ h(2)=3,\ h(3)=7,\ h(4)=15 \). These look like \( 2^n - 1 \).
Guess \( h(n) = 2^n - 1 \). Verify: \( 2(2^{n-1} - 1) + 1 = 2^n - 2 + 1 = 2^n - 1 \). It works. So the answer is \( h(n) = 2^n - 1 \).
Example 2 (Tower of Hanoi): \( h(n) = 2h(n-1) + 1 \), \( h(1) = 1 \)।
ছোট case গুলো বের করো: \( h(1)=1,\ h(2)=3,\ h(3)=7,\ h(4)=15 \)। এগুলো দেখতে \( 2^n - 1 \)-এর মতো।
Guess: \( h(n) = 2^n - 1 \)। Verify: \( 2(2^{n-1} - 1) + 1 = 2^n - 1 \)। মিলে যায়। তাই answer \( h(n) = 2^n - 1 \)।

The repertoire idea (kept simple)Repertoire idea (সহজভাবে)

The book "Concrete Mathematics" teaches a trick called the repertoire method. The simple version: guess that the answer is a mix of simple functions, like \( T(n) = A \cdot 2^n + B \cdot n + C \). Plug in small known values of \(T\) to find \(A, B, C\). Then verify the guess in the recurrence. You do not need the full theory for admission — the "compute small cases, guess the pattern, verify" habit is what matters.

"Concrete Mathematics" বইয়ে repertoire method নামে একটা trick শেখানো হয়। সহজ version: ধরো answer কিছু simple function-এর mix, যেমন \( T(n) = A \cdot 2^n + B \cdot n + C \)। ছোট known value গুলো বসিয়ে \(A, B, C\) বের করো। তারপর recurrence-এ guess-টা verify করো। Admission-এর জন্য full theory লাগবে না — "ছোট case বের করো, pattern guess করো, verify করো" — এই habit-টাই আসল।

Exam tip: Always test your closed-form answer with 2–3 small values of \(n\). One quick check catches most silly mistakes. Also memorize \( \sum k \), \( \sum k^2 \), \( \sum k^3 \), and the geometric sum — they appear again in algorithm analysis (Topic: Algorithms).
Exam tip: তোমার closed-form answer সবসময় \(n\)-এর 2–3টা ছোট value দিয়ে test করো। একটা quick check-ই বেশিরভাগ ভুল ধরে ফেলে। আর \( \sum k \), \( \sum k^2 \), \( \sum k^3 \), geometric sum মুখস্থ রাখো — এগুলো algorithm analysis-এও (Topic: Algorithms) আবার আসবে।

2. Permutations and Combinations2. Permutations and Combinations

Permutation = arrangement, where order matters. Combination = selection, where order does not matter. Picking a president and a secretary is a permutation. Picking two committee members is a combination.

Permutation মানে arrangement, যেখানে order matter করেCombination মানে selection, যেখানে order matter করে না। President আর secretary বাছাই করা permutation। Committee-র দুইজন member বাছাই করা combination।

\[ {}^{n}P_{r} = \frac{n!}{(n-r)!}, \qquad {}^{n}C_{r} = \binom{n}{r} = \frac{n!}{r!\,(n-r)!} \]
Example: From 7 students, choose 3 for gold, silver, bronze prizes (order matters):
\( {}^{7}P_{3} = \frac{7!}{4!} = 7 \times 6 \times 5 = 210 \).
Choose 3 for a team (order does not matter):
\( {}^{7}C_{3} = \frac{7 \times 6 \times 5}{3!} = \frac{210}{6} = 35 \).
Notice: \( {}^{n}P_{r} = {}^{n}C_{r} \times r! \). Each team of 3 can be ordered in \(3! = 6\) ways.
Example: 7 জন student থেকে gold, silver, bronze prize-এর জন্য 3 জন বাছাই (order matter করে):
\( {}^{7}P_{3} = \frac{7!}{4!} = 7 \times 6 \times 5 = 210 \)।
Team-এর জন্য 3 জন বাছাই (order matter করে না):
\( {}^{7}C_{3} = \frac{7 \times 6 \times 5}{3!} = \frac{210}{6} = 35 \)।
লক্ষ্য করো: \( {}^{n}P_{r} = {}^{n}C_{r} \times r! \)। 3 জনের প্রতিটা team-কে \(3! = 6\) ভাবে সাজানো যায়।

Useful identitiesদরকারি identities

  • Symmetry: \( \binom{n}{r} = \binom{n}{n-r} \). Choosing 3 to take = choosing 4 to leave (when \(n=7\)).
  • Pascal's rule: \( \binom{n}{r} = \binom{n-1}{r-1} + \binom{n-1}{r} \). Fix one item: either it is chosen or it is not.
  • Row sum: \( \sum_{r=0}^{n} \binom{n}{r} = 2^n \). Total number of subsets of an \(n\)-element set.
  • Edge values: \( \binom{n}{0} = \binom{n}{n} = 1 \), \( \binom{n}{1} = n \).
  • Symmetry: \( \binom{n}{r} = \binom{n}{n-r} \)। 3 জন নেওয়া = 4 জন বাদ দেওয়া (যখন \(n=7\))।
  • Pascal's rule: \( \binom{n}{r} = \binom{n-1}{r-1} + \binom{n-1}{r} \)। একটা item ধরো: হয় সেটা selected, নাহয় না।
  • Row sum: \( \sum_{r=0}^{n} \binom{n}{r} = 2^n \)। একটা \(n\)-element set-এর মোট subset সংখ্যা।
  • Edge values: \( \binom{n}{0} = \binom{n}{n} = 1 \), \( \binom{n}{1} = n \)।
Pascal's triangle, first six rows
Pascal's triangle. Each number is the sum of the two numbers above it — that is exactly Pascal's rule. Row \(n\) holds \( \binom{n}{0}, \binom{n}{1}, \dots, \binom{n}{n} \). Pascal's triangle। প্রতিটা number তার উপরের দুইটা number-এর sum — এটাই Pascal's rule। Row \(n\)-এ থাকে \( \binom{n}{0}, \binom{n}{1}, \dots, \binom{n}{n} \)।

Arrangements with repeated itemsRepeated item সহ arrangement

\[ \text{Arrangements of } n \text{ items with repeats } n_1, n_2, \dots = \frac{n!}{n_1!\, n_2! \cdots} \]
Example: Arrangements of the word MISSISSIPPI.
Total letters \(n = 11\). Repeats: I appears 4 times, S appears 4 times, P appears 2 times.
\[ \frac{11!}{4!\,4!\,2!} = \frac{39916800}{24 \cdot 24 \cdot 2} = \frac{39916800}{1152} = 34650. \]
Example: MISSISSIPPI শব্দটার arrangement সংখ্যা।
মোট letter \(n = 11\)। Repeat: I আছে 4 বার, S আছে 4 বার, P আছে 2 বার।
\[ \frac{11!}{4!\,4!\,2!} = \frac{39916800}{1152} = 34650. \]

Circular permutationsCircular permutations

Around a round table, rotations look the same. So we fix one person and arrange the rest. \(n\) people in a circle: \((n-1)!\) ways. If a necklace can also be flipped over, divide by 2: \(\frac{(n-1)!}{2}\).

গোল টেবিলে rotation করলে arrangement একই দেখায়। তাই একজনকে fix করে বাকিদের সাজাই। \(n\) জন circle-এ: \((n-1)!\) ভাবে। Necklace উল্টানোও যায়, তাই 2 দিয়ে ভাগ: \(\frac{(n-1)!}{2}\)।

Example: 5 friends sit around a round table: \( (5-1)! = 4! = 24 \) ways.
A necklace with 5 different beads: \( \frac{4!}{2} = 12 \) ways.
Example: 5 জন বন্ধু গোল টেবিলে বসবে: \( (5-1)! = 4! = 24 \) ভাবে।
5টা আলাদা bead দিয়ে necklace: \( \frac{4!}{2} = 12 \) ভাবে।

Counting → probabilityCounting → probability

Most probability problems are just counting problems. Probability = (favourable count) ÷ (total count), when all outcomes are equally likely.

বেশিরভাগ probability problem আসলে counting problem। সব outcome equally likely হলে, probability = (favourable count) ÷ (total count)।

Example: A committee of 3 is chosen at random from 4 boys and 3 girls. What is the probability it has exactly 2 girls?
Total ways: \( \binom{7}{3} = 35 \).
Favourable: choose 2 girls from 3 and 1 boy from 4: \( \binom{3}{2}\binom{4}{1} = 3 \times 4 = 12 \).
Probability \( = \frac{12}{35} \).
Example: 4 জন ছেলে আর 3 জন মেয়ে থেকে random-এ 3 জনের committee বানানো হলো। ঠিক 2 জন মেয়ে থাকার probability কত?
মোট উপায়: \( \binom{7}{3} = 35 \)।
Favourable: 3 জন মেয়ে থেকে 2 জন আর 4 জন ছেলে থেকে 1 জন: \( \binom{3}{2}\binom{4}{1} = 12 \)।
Probability \( = \frac{12}{35} \)।
Exam tip: First ask: does order matter? Order matters → permutation. Order does not matter → combination. "At least one" questions are usually easier by counting the opposite ("none") and subtracting from the total.
Exam tip: আগে জিজ্ঞেস করো: order কি matter করে? Order matter করলে → permutation। না করলে → combination। "At least one" type প্রশ্নে সাধারণত উল্টোটা ("none") গুনে total থেকে বিয়োগ করা সহজ।

3. Basic Probability3. Basic Probability

Sample space and eventsSample space আর events

The sample space \(S\) is the set of all possible outcomes of an experiment. An event is any subset of \(S\). For a fair die, \( S = \{1,2,3,4,5,6\} \), and "roll an even number" is the event \( \{2,4,6\} \).

Sample space \(S\) হলো একটা experiment-এর সব possible outcome-এর set। Event হলো \(S\)-এর যেকোনো subset। Fair die-এর জন্য \( S = \{1,2,3,4,5,6\} \), আর "even number ওঠা" event-টা হলো \( \{2,4,6\} \)।

ExperimentExperiment Sample space sizeSample space size
One coin tossএকটা coin toss2 (H, T)
Three coin tossesতিনটা coin toss\(2^3 = 8\)
One die rollএকটা die roll6
Two dice rolledদুইটা dice roll\(6 \times 6 = 36\)
Draw 1 card from a deckDeck থেকে 1টা card টানা52

Axioms of probabilityProbability-র axioms

  1. \( 0 \le P(A) \le 1 \) for any event \(A\).
  2. \( P(S) = 1 \). Something must happen.
  3. If \(A\) and \(B\) cannot happen together (mutually exclusive), then \( P(A \cup B) = P(A) + P(B) \).

From these: \( P(\varnothing) = 0 \) and \( P(A^c) = 1 - P(A) \) (the complement rule).

  1. যেকোনো event \(A\)-এর জন্য \( 0 \le P(A) \le 1 \)।
  2. \( P(S) = 1 \)। কিছু একটা ঘটবেই।
  3. \(A\) আর \(B\) একসাথে ঘটতে না পারলে (mutually exclusive), \( P(A \cup B) = P(A) + P(B) \)।

এগুলো থেকে পাই: \( P(\varnothing) = 0 \) আর \( P(A^c) = 1 - P(A) \) (complement rule)।

Addition ruleAddition rule

\[ P(A \cup B) = P(A) + P(B) - P(A \cap B) \]
Example: Draw one card. \(A\) = card is a heart, \(B\) = card is a king.
\( P(A) = \frac{13}{52} \), \( P(B) = \frac{4}{52} \), \( P(A \cap B) = \frac{1}{52} \) (king of hearts).
\( P(A \cup B) = \frac{13}{52} + \frac{4}{52} - \frac{1}{52} = \frac{16}{52} = \frac{4}{13} \).
We subtract \( \frac{1}{52} \) because the king of hearts was counted twice.
Example: একটা card টানো। \(A\) = card-টা heart, \(B\) = card-টা king।
\( P(A) = \frac{13}{52} \), \( P(B) = \frac{4}{52} \), \( P(A \cap B) = \frac{1}{52} \) (king of hearts)।
\( P(A \cup B) = \frac{13}{52} + \frac{4}{52} - \frac{1}{52} = \frac{16}{52} = \frac{4}{13} \)।
\( \frac{1}{52} \) বিয়োগ করলাম কারণ king of hearts দুইবার গোনা হয়েছিল।

Classic worked examplesClassic worked examples

Dice: Two fair dice are rolled. \(P(\text{sum} = 7)\)?
Total outcomes: 36. Favourable pairs: (1,6), (2,5), (3,4), (4,3), (5,2), (6,1) — that is 6.
\( P = \frac{6}{36} = \frac{1}{6} \). Sum 7 is the most likely sum with two dice.
Dice: দুইটা fair dice roll করা হলো। \(P(\text{sum} = 7)\)?
মোট outcome: 36। Favourable pair: (1,6), (2,5), (3,4), (4,3), (5,2), (6,1) — মোট 6টা।
\( P = \frac{6}{36} = \frac{1}{6} \)। দুই dice-এ sum 7-ই সবচেয়ে likely।
Coins (complementary counting): Toss a fair coin 3 times. \(P(\text{at least one head})\)?
Opposite event: no head at all = TTT. \( P(\text{TTT}) = \left(\frac{1}{2}\right)^3 = \frac{1}{8} \).
\( P(\text{at least one H}) = 1 - \frac{1}{8} = \frac{7}{8} \). Much faster than listing 7 cases.
Coins (complementary counting): একটা fair coin 3 বার toss করো। \(P(\text{at least one head})\)?
উল্টো event: একটাও head নেই = TTT। \( P(\text{TTT}) = \left(\frac{1}{2}\right)^3 = \frac{1}{8} \)।
\( P(\text{at least one H}) = 1 - \frac{1}{8} = \frac{7}{8} \)। 7টা case list করার চেয়ে অনেক দ্রুত।
Cards: Draw 2 cards without replacement. \(P(\text{both are aces})\)?
First ace: \( \frac{4}{52} \). Second ace (3 aces left in 51 cards): \( \frac{3}{51} \).
\( P = \frac{4}{52} \times \frac{3}{51} = \frac{12}{2652} = \frac{1}{221} \).
Cards: Replacement ছাড়া 2টা card টানো। \(P(\text{both are aces})\)?
প্রথম ace: \( \frac{4}{52} \)। দ্বিতীয় ace (51টা card-এ 3টা ace বাকি): \( \frac{3}{51} \)।
\( P = \frac{4}{52} \times \frac{3}{51} = \frac{1}{221} \)।

Independent vs mutually exclusiveIndependent বনাম mutually exclusive

  • Independent: one event gives no information about the other. Then \( P(A \cap B) = P(A)P(B) \). Example: two separate coin tosses.
  • Mutually exclusive: both cannot happen together, so \( P(A \cap B) = 0 \). Example: one die roll being both 2 and 5.
  • Independent: এক event অন্যটার সম্পর্কে কোনো information দেয় না। তখন \( P(A \cap B) = P(A)P(B) \)। যেমন: দুইটা আলাদা coin toss।
  • Mutually exclusive: দুটো একসাথে ঘটতে পারে না, তাই \( P(A \cap B) = 0 \)। যেমন: এক die roll-এ একসাথে 2 আর 5 ওঠা।
Common trap: Mutually exclusive is NOT the same as independent. In fact, if \(P(A) > 0\) and \(P(B) > 0\), mutually exclusive events are always dependent: if \(A\) happened, you know \(B\) did not. Independent needs \( P(A \cap B) = P(A)P(B) \), which is not zero here. BUET MCQs love this trap.
Common trap: Mutually exclusive আর independent এক জিনিস না। বরং \(P(A) > 0\) আর \(P(B) > 0\) হলে, mutually exclusive event গুলো সবসময় dependent: \(A\) ঘটলে তুমি জানো \(B\) ঘটেনি। Independent হতে লাগে \( P(A \cap B) = P(A)P(B) \), যা এখানে zero না। BUET-এর MCQ-তে এই trap খুব আসে।

Runs in Coin Tosses (Real Exam Topic!)Runs in Coin Tosses (Real Exam Topic!)

A run is a maximal block of identical outcomes in a row. "Maximal" means the block cannot be stretched any further on either side. In the sequence HHTTTH there are 3 runs: HH, then TTT, then H.

Two simple facts to remember:

  • Every sequence starts with a run.
  • A new run starts exactly when a toss is different from the toss just before it.

Run হলো পরপর একই outcome-এর একটা maximal block। "Maximal" মানে block-টাকে কোনো দিকেই আর বড় করা যায় না। HHTTTH sequence-এ 3টা run আছে: HH, তারপর TTT, তারপর H।

দুইটা সহজ fact মনে রাখো:

  • প্রতিটা sequence একটা run দিয়ে শুরু হয়।
  • যখনই কোনো toss তার ঠিক আগের toss থেকে আলাদা হয়, ঠিক তখনই একটা নতুন run শুরু হয়।
Worked example 1 (enumerate!): A fair coin is tossed 3 times. What is the probability the sequence contains a run of at least 2 heads (two H in a row)?
The sample space has \( 2^3 = 8 \) equally likely outcomes:
HHH, HHT, HTH, HTT, THH, THT, TTH, TTT.
Which ones have two H in a row? HHH ✓, HHT ✓, THH ✓. Note HTH does not count — its two heads are separated by a tail.
\( P = \frac{3}{8} \). For small sample spaces, listing all outcomes is the safest and fastest method.
Worked example 1 (enumerate!): একটা fair coin 3 বার toss করা হলো। Sequence-এ at least 2 heads-এর একটা run (পরপর দুইটা H) থাকার probability কত?
Sample space-এ \( 2^3 = 8 \)টা equally likely outcome:
HHH, HHT, HTH, HTT, THH, THT, TTH, TTT।
কোনগুলোতে পরপর দুইটা H আছে? HHH ✓, HHT ✓, THH ✓। খেয়াল করো HTH গোনা হবে না — তার দুইটা head-এর মাঝে একটা tail আছে।
\( P = \frac{3}{8} \)। ছোট sample space-এ সব outcome list করাই সবচেয়ে safe আর দ্রুত method।
Worked example 2 (expected number of runs): A fair coin is tossed \( n \) times. What is the expected number of runs?
Use indicator variables. The first toss always starts a run — that gives the 1. Then look at the \( n - 1 \) boundaries between neighbouring tosses. For boundary \( i \) (between toss \( i \) and toss \( i+1 \)), let \( X_i = 1 \) if the two tosses differ (a new run starts there), else 0.
For a fair coin, \( P(\text{two neighbouring tosses differ}) = \frac{1}{2} \), so \( E[X_i] = \frac{1}{2} \).
By linearity of expectation:
\[ E[\text{runs}] = 1 + \sum_{i=1}^{n-1} E[X_i] = 1 + \frac{n-1}{2} \] Check with \( n = 3 \): formula gives \( 1 + 1 = 2 \). By listing: HHH→1, HHT→2, HTH→3, HTT→2, THH→2, THT→3, TTH→2, TTT→1. Average \( = \frac{16}{8} = 2 \). Correct.
The \( X_i \) are not independent, but linearity of expectation does not care — that is the whole trick.
Worked example 2 (expected number of runs): একটা fair coin \( n \) বার toss করা হলো। Expected number of runs কত?
Indicator variable ব্যবহার করো। প্রথম toss-টা সবসময় একটা run শুরু করে — সেখান থেকেই 1 আসে। তারপর পাশাপাশি toss-গুলোর মাঝের \( n - 1 \)টা boundary দেখো। Boundary \( i \)-এর জন্য (toss \( i \) আর toss \( i+1 \)-এর মাঝে), ধরো \( X_i = 1 \) যদি toss দুইটা আলাদা হয় (সেখানে নতুন run শুরু হয়), নাহলে 0।
Fair coin-এর জন্য \( P(\text{পাশাপাশি দুই toss আলাদা}) = \frac{1}{2} \), তাই \( E[X_i] = \frac{1}{2} \)।
Linearity of expectation দিয়ে:
\[ E[\text{runs}] = 1 + \sum_{i=1}^{n-1} E[X_i] = 1 + \frac{n-1}{2} \] \( n = 3 \) দিয়ে check: formula দেয় \( 1 + 1 = 2 \)। List করলে: HHH→1, HHT→2, HTH→3, HTT→2, THH→2, THT→3, TTH→2, TTT→1। Average \( = \frac{16}{8} = 2 \)। ঠিক আছে।
\( X_i \)-গুলো independent না, কিন্তু linearity of expectation-এর তাতে কিছু যায় আসে না — এটাই পুরো trick।

Connection to the geometric distribution: once a run of heads starts, each next toss continues it with probability \( \frac{1}{2} \) and ends it with probability \( \frac{1}{2} \). So the length \( L \) of a run of heads follows a geometric distribution: \( P(L = k) = \left(\frac{1}{2}\right)^{k-1} \cdot \frac{1}{2} = \left(\frac{1}{2}\right)^{k} \), and the expected run length is \( E[L] = 2 \). Long runs get rare very fast — a run of length 5 has probability \( \frac{1}{32} \).

Geometric distribution-এর সাথে connection: একবার heads-এর run শুরু হলে, পরের প্রতিটা toss probability \( \frac{1}{2} \) দিয়ে run-টা চালিয়ে যায় আর \( \frac{1}{2} \) দিয়ে শেষ করে। তাই heads-এর run-এর length \( L \) একটা geometric distribution মানে: \( P(L = k) = \left(\frac{1}{2}\right)^{k-1} \cdot \frac{1}{2} = \left(\frac{1}{2}\right)^{k} \), আর expected run length \( E[L] = 2 \)। লম্বা run খুব দ্রুত rare হয়ে যায় — length 5-এর একটা run-এর probability \( \frac{1}{32} \)।

Real exam alert: Run-length probability analysis was asked in the BUET MSc admission exam of April 2024. Practise both skills: enumerating small coin sequences by hand, and using indicator variables for the expected number of runs.
Real exam alert: Run-length probability analysis প্রশ্নটা April 2024-এর BUET MSc admission exam-এ এসেছিল। দুইটা skill-ই practise করো: হাতে ছোট coin sequence enumerate করা, আর expected number of runs-এর জন্য indicator variable ব্যবহার করা।
Speed Math for the Exam: probability questions carry about 10 marks each, and you get roughly 3 minutes per question. Memorize these three shortcuts:
1. \( P(\text{at least one}) = 1 - P(\text{none}) \) — the complement is almost always faster.
2. Linearity of expectation works without independence — never waste time checking independence for an expected value.
3. For a small sample space (8 or 16 outcomes), just enumerate — listing beats formulas under time pressure.
Speed Math for the Exam: probability প্রশ্নে সাধারণত 10 marks করে থাকে, আর প্রতি প্রশ্নে সময় মোটামুটি 3 minutes। এই তিনটা shortcut মুখস্থ রাখো:
1. \( P(\text{at least one}) = 1 - P(\text{none}) \) — complement প্রায় সবসময় দ্রুত।
2. Linearity of expectation independence ছাড়াই কাজ করে — expected value-র জন্য independence check করে সময় নষ্ট কোরো না।
3. ছোট sample space হলে (8 বা 16টা outcome) সরাসরি enumerate করো — সময়ের চাপে formula-র চেয়ে list করাই ভালো।

4. Conditional Probability and Bayes Theorem4. Conditional Probability and Bayes Theorem

Conditional probabilityConditional probability

\( P(A \mid B) \) means: the probability of \(A\), given that \(B\) already happened. Knowing \(B\) shrinks the sample space down to \(B\) only.

\( P(A \mid B) \) মানে: \(B\) ঘটে গেছে জেনে নিয়ে \(A\)-এর probability। \(B\) জানা থাকলে sample space ছোট হয়ে শুধু \(B\) হয়ে যায়।

\[ P(A \mid B) = \frac{P(A \cap B)}{P(B)}, \qquad P(B) > 0 \]
Example: Roll one die. \(B\) = the number is even = \(\{2,4,6\}\). \(A\) = the number is greater than 3 = \(\{4,5,6\}\).
\( A \cap B = \{4, 6\} \), so \( P(A \cap B) = \frac{2}{6} \) and \( P(B) = \frac{3}{6} \).
\( P(A \mid B) = \frac{2/6}{3/6} = \frac{2}{3} \).
Sense check: given even, the options are \(\{2,4,6\}\); two of the three are above 3. Correct.
Example: একটা die roll করো। \(B\) = number টা even = \(\{2,4,6\}\)। \(A\) = number টা 3-এর বেশি = \(\{4,5,6\}\)।
\( A \cap B = \{4, 6\} \), তাই \( P(A \cap B) = \frac{2}{6} \) আর \( P(B) = \frac{3}{6} \)।
\( P(A \mid B) = \frac{2/6}{3/6} = \frac{2}{3} \)।
Sense check: even জানা থাকলে option \(\{2,4,6\}\); তিনটার মধ্যে দুইটা 3-এর বেশি। ঠিক আছে।

Multiplication ruleMultiplication rule

\[ P(A \cap B) = P(B)\,P(A \mid B) = P(A)\,P(B \mid A) \]
Example: A box has 3 red and 2 blue balls. Draw two, one by one, without replacement. \(P(\text{both red})\)?
\( P(\text{1st red}) = \frac{3}{5} \). Given the first was red, \( P(\text{2nd red}) = \frac{2}{4} \).
\( P(\text{both red}) = \frac{3}{5} \times \frac{2}{4} = \frac{6}{20} = \frac{3}{10} \).
Example: একটা box-এ 3টা red আর 2টা blue ball। Replacement ছাড়া একটার পর একটা করে দুইটা টানো। \(P(\text{both red})\)?
\( P(\text{1st red}) = \frac{3}{5} \)। প্রথমটা red হলে \( P(\text{2nd red}) = \frac{2}{4} \)।
\( P(\text{both red}) = \frac{3}{5} \times \frac{2}{4} = \frac{3}{10} \)।

Law of total probabilityLaw of total probability

If \( B_1, B_2, \dots, B_n \) split the sample space into non-overlapping pieces (a partition), then any event \(A\) can be computed piece by piece:

যদি \( B_1, B_2, \dots, B_n \) sample space-কে non-overlapping টুকরোয় ভাগ করে (partition), তাহলে যেকোনো event \(A\) টুকরো টুকরো করে হিসাব করা যায়:

\[ P(A) = \sum_{i=1}^{n} P(B_i)\,P(A \mid B_i) \]

Bayes theoremBayes theorem

Bayes theorem flips a conditional probability. You know \( P(A \mid B) \), you want \( P(B \mid A) \). It answers: "the result happened — which cause is likely behind it?"

Bayes theorem একটা conditional probability উল্টে দেয়। তুমি জানো \( P(A \mid B) \), চাও \( P(B \mid A) \)। এটা answer দেয়: "result-টা ঘটে গেছে — কোন cause-এর সম্ভাবনা বেশি?"

\[ P(B_k \mid A) = \frac{P(B_k)\,P(A \mid B_k)}{\sum_{i} P(B_i)\,P(A \mid B_i)} \]
Full worked example (disease test — BUET favourite):
A disease affects 1% of people. A test detects the disease 99% of the time when it is present (true positive). But it also gives a false positive 5% of the time for healthy people. A random person tests positive. What is the probability they really have the disease?

Let \(D\) = has disease, \(+\) = tests positive.
Given: \( P(D) = 0.01 \), \( P(+ \mid D) = 0.99 \), \( P(+ \mid D^c) = 0.05 \).
Step 1 — total probability of a positive test:
\[ P(+) = P(D)P(+ \mid D) + P(D^c)P(+ \mid D^c) = (0.01)(0.99) + (0.99)(0.05) = 0.0099 + 0.0495 = 0.0594 \] Step 2 — Bayes:
\[ P(D \mid +) = \frac{0.0099}{0.0594} \approx 0.1667 \approx 16.7\% \] Surprise: even after a positive test, the chance is only about 1 in 6. Why? Healthy people are so many (99%) that their few false positives (5%) still outnumber the true positives.
Full worked example (disease test — BUET favourite):
একটা disease 1% মানুষের হয়। Disease থাকলে test 99% সময় ধরে ফেলে (true positive)। কিন্তু healthy মানুষের বেলায় 5% সময় false positive দেয়। Random একজনের test positive এলো। তার আসলেই disease থাকার probability কত?

ধরো \(D\) = disease আছে, \(+\) = test positive।
Given: \( P(D) = 0.01 \), \( P(+ \mid D) = 0.99 \), \( P(+ \mid D^c) = 0.05 \)।
Step 1 — positive test-এর total probability:
\[ P(+) = (0.01)(0.99) + (0.99)(0.05) = 0.0099 + 0.0495 = 0.0594 \] Step 2 — Bayes:
\[ P(D \mid +) = \frac{0.0099}{0.0594} \approx 0.1667 \approx 16.7\% \] অবাক করা ব্যাপার: positive test-এর পরেও chance মাত্র 1 in 6-এর মতো। কেন? Healthy মানুষ এত বেশি (99%) যে তাদের অল্প false positive (5%)-ও true positive-এর চেয়ে বেশি হয়ে যায়।
Second worked example (factory items):
Machine A makes 60% of all items and 2% of its items are defective. Machine B makes 40% and 5% of its items are defective. An item picked at random is defective. What is the probability it came from B?

\( P(A) = 0.6,\ P(B) = 0.4,\ P(D \mid A) = 0.02,\ P(D \mid B) = 0.05 \).
\( P(D) = (0.6)(0.02) + (0.4)(0.05) = 0.012 + 0.020 = 0.032 \).
\( P(B \mid D) = \frac{0.020}{0.032} = 0.625 \).
So a defective item most likely came from B, even though B makes fewer items — because B's defect rate is much higher.
Second worked example (factory items):
Machine A মোট item-এর 60% বানায়, আর তার 2% defective। Machine B বানায় 40%, তার 5% defective। Random একটা item নেওয়া হলো, সেটা defective। এটা B থেকে আসার probability কত?

\( P(A) = 0.6,\ P(B) = 0.4,\ P(D \mid A) = 0.02,\ P(D \mid B) = 0.05 \)।
\( P(D) = (0.6)(0.02) + (0.4)(0.05) = 0.012 + 0.020 = 0.032 \)।
\( P(B \mid D) = \frac{0.020}{0.032} = 0.625 \)।
তাই defective item সম্ভবত B থেকেই এসেছে, যদিও B কম item বানায় — কারণ B-এর defect rate অনেক বেশি।
Exam tip: For any Bayes problem, write three lines first: the prior probabilities, the conditional probabilities, and the total probability (denominator). Then divide. Most marks are lost by forgetting the "healthy but false positive" branch in the denominator.
Exam tip: যেকোনো Bayes problem-এ আগে তিনটা line লেখো: prior probability গুলো, conditional probability গুলো, আর total probability (denominator)। তারপর ভাগ করো। বেশিরভাগ marks হারায় denominator-এ "healthy কিন্তু false positive" branch টা ভুলে গিয়ে।

5. Random Variables and Distributions5. Random Variables and Distributions

What is a random variable?Random variable কী?

A random variable \(X\) is a number attached to a random outcome. Example: toss 3 coins, let \(X\) = number of heads. \(X\) can be 0, 1, 2, or 3.

  • Discrete: \(X\) takes separate values you can list (0, 1, 2, ...). Example: number of heads.
  • Continuous: \(X\) can be any value in a range. Example: exact temperature, waiting time.

Random variable \(X\) হলো random outcome-এর সাথে লাগানো একটা number। যেমন: 3টা coin toss করো, \(X\) = head-এর সংখ্যা। \(X\) হতে পারে 0, 1, 2, বা 3।

  • Discrete: \(X\) আলাদা আলাদা value নেয়, যেগুলো list করা যায় (0, 1, 2, ...)। যেমন: head-এর সংখ্যা।
  • Continuous: \(X\) একটা range-এর যেকোনো value নিতে পারে। যেমন: exact temperature, waiting time।

PMF, PDF, CDFPMF, PDF, CDF

NameName Forকার জন্য Meaningমানে
PMF \( p(x) \) discretediscrete \( P(X = x) \) — probability of exactly \(x\). All PMF values add to 1.\( P(X = x) \) — ঠিক \(x\) হওয়ার probability। সব PMF value যোগ করলে 1।
PDF \( f(x) \) continuouscontinuous density; probability = area under the curve. \( P(X = \text{one exact value}) = 0 \).density; probability = curve-এর নিচের area। \( P(X = \text{একটা exact value}) = 0 \)।
CDF \( F(x) \) bothদুটোর জন্যই \( F(x) = P(X \le x) \) — accumulated probability up to \(x\). It never decreases; goes from 0 to 1.\( F(x) = P(X \le x) \) — \(x\) পর্যন্ত জমা হওয়া probability। কখনো কমে না; 0 থেকে 1-এ যায়।

Bernoulli distributionBernoulli distribution

One trial, two outcomes: success (probability \(p\)) or failure (probability \(1-p\)). \(X = 1\) for success, \(0\) for failure. One coin toss with \(p = 0.5\) is Bernoulli.

একটা মাত্র trial, দুইটা outcome: success (probability \(p\)) বা failure (probability \(1-p\))। Success হলে \(X = 1\), failure হলে \(0\)। \(p = 0.5\)-এর একটা coin toss হলো Bernoulli।

Binomial distributionBinomial distribution

Repeat a Bernoulli trial \(n\) times, independently. \(X\) = total number of successes. We write \( X \sim \text{Binomial}(n, p) \).

একটা Bernoulli trial \(n\) বার independently repeat করো। \(X\) = মোট success সংখ্যা। লেখা হয় \( X \sim \text{Binomial}(n, p) \)।

\[ P(X = k) = \binom{n}{k} p^k (1-p)^{\,n-k}, \qquad k = 0, 1, \dots, n \]
Worked example: A fair coin is tossed 5 times. \(P(\text{exactly 3 heads})\)?
\( n = 5,\ p = \frac{1}{2},\ k = 3 \).
\[ P(X = 3) = \binom{5}{3} \left(\tfrac{1}{2}\right)^3 \left(\tfrac{1}{2}\right)^2 = 10 \times \tfrac{1}{32} = \tfrac{10}{32} = \tfrac{5}{16} = 0.3125 \] The \( \binom{5}{3} = 10 \) counts which 3 of the 5 tosses are the heads.
Worked example: একটা fair coin 5 বার toss করা হলো। \(P(\text{exactly 3 heads})\)?
\( n = 5,\ p = \frac{1}{2},\ k = 3 \)।
\[ P(X = 3) = \binom{5}{3} \left(\tfrac{1}{2}\right)^3 \left(\tfrac{1}{2}\right)^2 = 10 \times \tfrac{1}{32} = \tfrac{5}{16} = 0.3125 \] \( \binom{5}{3} = 10 \) গুনে দেয় 5টা toss-এর কোন 3টা head হবে।
Binomial distribution PMF for different n and p
Binomial PMF for different \(n\) and \(p\). The peak sits near \(np\). For \(p = 0.5\) the shape is symmetric. বিভিন্ন \(n\) আর \(p\)-এর জন্য Binomial PMF। Peak থাকে \(np\)-এর কাছে। \(p = 0.5\) হলে shape symmetric হয়।

Poisson distributionPoisson distribution

Poisson counts rare events in a fixed time or space, when only the average rate \( \lambda \) is known. Examples: calls per hour at a helpline, typos per page, packets per second at a router.

Poisson গোনে fixed time বা space-এ rare event, যখন শুধু average rate \( \lambda \) জানা থাকে। যেমন: helpline-এ প্রতি ঘণ্টায় call, প্রতি page-এ typo, router-এ প্রতি second-এ packet।

\[ P(X = k) = \frac{e^{-\lambda}\, \lambda^{k}}{k!}, \qquad k = 0, 1, 2, \dots \]
Worked example: A call centre gets on average \( \lambda = 2 \) calls per minute. \(P(\text{exactly 3 calls in a minute})\)?
\[ P(X = 3) = \frac{e^{-2}\, 2^{3}}{3!} = \frac{0.1353 \times 8}{6} \approx 0.1804 \] And \( P(\text{no calls}) = e^{-2} \approx 0.1353 \).
Worked example: একটা call centre-এ গড়ে \( \lambda = 2 \) calls per minute আসে। \(P(\text{exactly 3 calls in a minute})\)?
\[ P(X = 3) = \frac{e^{-2}\, 2^{3}}{3!} = \frac{0.1353 \times 8}{6} \approx 0.1804 \] আর \( P(\text{no calls}) = e^{-2} \approx 0.1353 \)।
Poisson distribution PMF for different lambda values
Poisson PMF for different \( \lambda \). Small \( \lambda \): squeezed near 0. Larger \( \lambda \): the shape spreads and looks more like a bell. বিভিন্ন \( \lambda \)-এর জন্য Poisson PMF। ছোট \( \lambda \): 0-এর কাছে চাপা। বড় \( \lambda \): shape ছড়িয়ে যায়, অনেকটা bell-এর মতো দেখায়।
Binomial vs Poisson — when to use which: Binomial needs a fixed number of trials \(n\) and success chance \(p\) ("out of 10 items, how many defective?"). Poisson has no fixed \(n\), only a rate over time/space ("how many defects per metre of wire?"). Also, when \(n\) is huge and \(p\) is tiny, Binomial ≈ Poisson with \( \lambda = np \). Exams test exactly this switch.
Binomial vs Poisson — কখন কোনটা: Binomial-এ লাগে fixed trial সংখ্যা \(n\) আর success chance \(p\) ("10টা item-এর মধ্যে কয়টা defective?")। Poisson-এ fixed \(n\) নেই, শুধু time/space-এর উপর একটা rate ("প্রতি metre wire-এ কয়টা defect?")। আর \(n\) খুব বড় এবং \(p\) খুব ছোট হলে Binomial ≈ Poisson, যেখানে \( \lambda = np \)। Exam-এ ঠিক এই switch-টাই ধরা হয়।

Uniform distributionUniform distribution

Discrete uniform: every value equally likely, like a fair die: \( P(X = k) = \frac{1}{6} \) for \(k = 1..6\).
Continuous uniform on \([a, b]\): flat PDF \( f(x) = \frac{1}{b-a} \). Probability of a sub-interval = its length ÷ \((b-a)\).

Discrete uniform: প্রতিটা value equally likely, যেমন fair die: \( P(X = k) = \frac{1}{6} \), \(k = 1..6\)।
Continuous uniform \([a, b]\)-তে: flat PDF \( f(x) = \frac{1}{b-a} \)। কোনো sub-interval-এর probability = তার length ÷ \((b-a)\)।

Example: A bus arrives at a random time uniformly in a 20-minute window. \(P(\text{you wait at most 5 minutes}) = \frac{5}{20} = 0.25\).
Example: একটা bus 20-minute window-এর মধ্যে uniformly random time-এ আসে। \(P(\text{তোমার wait বড়জোর 5 minutes}) = \frac{5}{20} = 0.25\)।

Normal distribution and z-scoreNormal distribution আর z-score

The Normal (Gaussian) distribution is the famous bell curve, written \( X \sim N(\mu, \sigma^2) \). It is symmetric around the mean \( \mu \); the spread is set by the standard deviation \( \sigma \). Heights, marks, and measurement errors are roughly Normal.

The z-score converts any Normal value to the standard Normal \( N(0, 1) \):

Normal (Gaussian) distribution হলো বিখ্যাত bell curve, লেখা হয় \( X \sim N(\mu, \sigma^2) \)। এটা mean \( \mu \)-এর চারপাশে symmetric; ছড়ানোটা ঠিক করে standard deviation \( \sigma \)। Height, marks, measurement error — এগুলো মোটামুটি Normal।

z-score যেকোনো Normal value-কে standard Normal \( N(0, 1) \)-এ convert করে:

\[ z = \frac{x - \mu}{\sigma} \]
Normal distribution curve showing the 68-95-99.7 rule
The Normal curve and the 68–95–99.7 rule: about 68% of data lies within \( \pm 1\sigma \), 95% within \( \pm 2\sigma \), 99.7% within \( \pm 3\sigma \) of the mean. Normal curve আর 68–95–99.7 rule: প্রায় 68% data থাকে mean-এর \( \pm 1\sigma \)-এর মধ্যে, 95% থাকে \( \pm 2\sigma \)-এর মধ্যে, 99.7% থাকে \( \pm 3\sigma \)-এর মধ্যে।
Worked example: Exam marks are Normal with \( \mu = 60 \), \( \sigma = 10 \). A student got 80.
\( z = \frac{80 - 60}{10} = 2 \). The student is 2 standard deviations above the mean.
By the 95% rule, only about 2.5% of students score above \( z = 2 \). So 80 is roughly the top 2.5%.
Worked example: Exam marks Normal, \( \mu = 60 \), \( \sigma = 10 \)। এক student পেল 80।
\( z = \frac{80 - 60}{10} = 2 \)। Student-টা mean-এর চেয়ে 2 standard deviation উপরে।
95% rule অনুযায়ী, মাত্র প্রায় 2.5% student \( z = 2 \)-এর উপরে score করে। তাই 80 মোটামুটি top 2.5%।

6. Expectation and Variance6. Expectation and Variance

Expected value E[X]Expected value E[X]

The expectation \( E[X] \) is the long-run average of \(X\). For a discrete variable, multiply each value by its probability and add.

Expectation \( E[X] \) হলো \(X\)-এর long-run average। Discrete variable-এর জন্য প্রতিটা value-কে তার probability দিয়ে multiply করে যোগ করো।

\[ E[X] = \sum_{x} x \cdot P(X = x) \]
Example: \(X\) = result of one fair die roll.
\[ E[X] = \frac{1+2+3+4+5+6}{6} = \frac{21}{6} = 3.5 \] Note: 3.5 is never an actual outcome. Expectation is an average, not a prediction of one roll.
Example: \(X\) = একটা fair die roll-এর result।
\[ E[X] = \frac{1+2+3+4+5+6}{6} = \frac{21}{6} = 3.5 \] লক্ষ্য করো: 3.5 কখনো আসল outcome না। Expectation একটা average, এক roll-এর prediction না।

Linearity of expectationLinearity of expectation

The most powerful rule in this chapter: \( E[X + Y] = E[X] + E[Y] \) — always, even when \(X\) and \(Y\) are dependent. Also \( E[aX + b] = aE[X] + b \).

এই chapter-এর সবচেয়ে powerful rule: \( E[X + Y] = E[X] + E[Y] \) — সবসময়, এমনকি \(X\) আর \(Y\) dependent হলেও। আর \( E[aX + b] = aE[X] + b \)।

Example 1: Two dice are rolled. Expected sum?
\( E[X_1 + X_2] = E[X_1] + E[X_2] = 3.5 + 3.5 = 7 \). No need to list 36 outcomes.
Example 1: দুইটা dice roll করা হলো। Expected sum?
\( E[X_1 + X_2] = E[X_1] + E[X_2] = 3.5 + 3.5 = 7 \)। 36টা outcome list করার দরকার নেই।
Example 2 (indicator trick): 10 people throw their hats in a box and each takes one back at random. Expected number of people who get their own hat?
Let \( X_i = 1 \) if person \(i\) gets their own hat, else 0. \( E[X_i] = \frac{1}{10} \).
\( E[X] = E[X_1] + \dots + E[X_{10}] = 10 \times \frac{1}{10} = 1 \).
The \(X_i\) are dependent, but linearity does not care. Answer: exactly 1 on average.
Example 2 (indicator trick): 10 জন মানুষ box-এ hat ফেলে random-এ একটা করে ফেরত নেয়। গড়ে কতজন নিজের hat পাবে?
ধরো \( X_i = 1 \) যদি person \(i\) নিজের hat পায়, নাহলে 0। \( E[X_i] = \frac{1}{10} \)।
\( E[X] = E[X_1] + \dots + E[X_{10}] = 10 \times \frac{1}{10} = 1 \)।
\(X_i\) গুলো dependent, কিন্তু linearity-র তাতে কিছু যায় আসে না। Answer: গড়ে ঠিক 1 জন।

Variance and standard deviationVariance আর standard deviation

Variance measures how spread out \(X\) is around its mean. Standard deviation \( \sigma \) is its square root — same unit as \(X\).

Variance মাপে \(X\) তার mean-এর চারপাশে কতটা ছড়ানো। Standard deviation \( \sigma \) হলো তার square root — \(X\)-এর same unit-এ।

\[ \operatorname{Var}(X) = E\big[(X - \mu)^2\big] = E[X^2] - \big(E[X]\big)^2, \qquad \sigma = \sqrt{\operatorname{Var}(X)} \]
Worked example: Variance of one fair die roll.
\( E[X] = 3.5 \).
\( E[X^2] = \frac{1^2 + 2^2 + 3^2 + 4^2 + 5^2 + 6^2}{6} = \frac{91}{6} \).
\[ \operatorname{Var}(X) = \frac{91}{6} - (3.5)^2 = 15.1667 - 12.25 = \frac{35}{12} \approx 2.9167 \] \( \sigma = \sqrt{35/12} \approx 1.708 \).
Worked example: একটা fair die roll-এর variance।
\( E[X] = 3.5 \)।
\( E[X^2] = \frac{1^2 + 2^2 + \dots + 6^2}{6} = \frac{91}{6} \)।
\[ \operatorname{Var}(X) = \frac{91}{6} - (3.5)^2 = \frac{35}{12} \approx 2.9167 \] \( \sigma = \sqrt{35/12} \approx 1.708 \)।

Useful rules: \( \operatorname{Var}(aX + b) = a^2 \operatorname{Var}(X) \) — shifting by \(b\) changes nothing, scaling by \(a\) scales variance by \(a^2\). If \(X\) and \(Y\) are independent, \( \operatorname{Var}(X + Y) = \operatorname{Var}(X) + \operatorname{Var}(Y) \).

দরকারি rules: \( \operatorname{Var}(aX + b) = a^2 \operatorname{Var}(X) \) — \(b\) দিয়ে shift করলে কিছু বদলায় না, \(a\) দিয়ে scale করলে variance \(a^2\) গুণ হয়। \(X\) আর \(Y\) independent হলে \( \operatorname{Var}(X + Y) = \operatorname{Var}(X) + \operatorname{Var}(Y) \)।

Mean and variance of common distributionsCommon distribution-এর mean আর variance

DistributionDistribution \( E[X] \) \( \operatorname{Var}(X) \)
Bernoulli(\(p\))\( p \)\( p(1-p) \)
Binomial(\(n, p\))\( np \)\( np(1-p) \)
Poisson(\( \lambda \))\( \lambda \)\( \lambda \)
Uniform on \([a,b]\)Uniform \([a,b]\)-তে\( \frac{a+b}{2} \)\( \frac{(b-a)^2}{12} \)
Normal(\( \mu, \sigma^2 \))\( \mu \)\( \sigma^2 \)
Example (Binomial): Toss a fair coin 100 times. \(X\) = number of heads.
\( E[X] = np = 100 \times 0.5 = 50 \). \( \operatorname{Var}(X) = np(1-p) = 100 \times 0.5 \times 0.5 = 25 \). \( \sigma = 5 \).
So most runs land between 45 and 55 heads (within \( \pm 1\sigma \)).
Example (Binomial): একটা fair coin 100 বার toss করো। \(X\) = head সংখ্যা।
\( E[X] = np = 50 \)। \( \operatorname{Var}(X) = np(1-p) = 25 \)। \( \sigma = 5 \)।
তাই বেশিরভাগ সময় head পড়বে 45 থেকে 55-এর মধ্যে (\( \pm 1\sigma \)-এর ভেতরে)।
Example (Poisson): If \( X \sim \text{Poisson}(4) \), then \( E[X] = 4 \) and \( \operatorname{Var}(X) = 4 \) — for Poisson, mean and variance are always equal. This equality is a quick MCQ check.
Example (Poisson): যদি \( X \sim \text{Poisson}(4) \) হয়, তাহলে \( E[X] = 4 \) আর \( \operatorname{Var}(X) = 4 \) — Poisson-এ mean আর variance সবসময় সমান। এই equality একটা quick MCQ check।
Exam tip: The formula \( \operatorname{Var}(X) = E[X^2] - (E[X])^2 \) is almost always faster than \( E[(X-\mu)^2] \). Compute \(E[X]\) first, then \(E[X^2]\), then subtract. Also remember: variance can never be negative — a negative result means an arithmetic slip.
Exam tip: \( \operatorname{Var}(X) = E[X^2] - (E[X])^2 \) formula-টা প্রায় সবসময় \( E[(X-\mu)^2] \)-এর চেয়ে দ্রুত। আগে \(E[X]\), তারপর \(E[X^2]\), তারপর বিয়োগ। মনে রেখো: variance কখনো negative হতে পারে না — negative এলে হিসাবে ভুল আছে।

7. Basic Statistics7. Basic Statistics

Mean, median, modeMean, median, mode

  • Mean = sum of all values ÷ how many values. \( \bar{x} = \frac{1}{n}\sum x_i \).
  • Median = the middle value after sorting. If \(n\) is even, average the two middle values.
  • Mode = the most frequent value.
  • Mean = সব value-র sum ÷ value সংখ্যা। \( \bar{x} = \frac{1}{n}\sum x_i \)।
  • Median = sort করার পর মাঝের value। \(n\) even হলে মাঝের দুইটার average।
  • Mode = সবচেয়ে বেশিবার আসা value।
Example: Data: 7, 3, 9, 3, 8.
Mean \( = \frac{7+3+9+3+8}{5} = \frac{30}{5} = 6 \).
Sorted: 3, 3, 7, 8, 9 → Median = 7. Mode = 3 (appears twice).
Range = max − min = 9 − 3 = 6.
Example: Data: 7, 3, 9, 3, 8।
Mean \( = \frac{30}{5} = 6 \)।
Sort করলে: 3, 3, 7, 8, 9 → Median = 7। Mode = 3 (দুইবার আছে)।
Range = max − min = 9 − 3 = 6।
Note: The mean is pulled by outliers; the median is not. Salaries {20k, 25k, 30k, 500k}: mean ≈ 144k (misleading), median = 27.5k (honest picture).
Note: Outlier mean-কে টেনে নেয়; median-কে না। Salary {20k, 25k, 30k, 500k}: mean ≈ 144k (বিভ্রান্তিকর), median = 27.5k (সঠিক ছবি)।

Variance and standard deviation of a data setData set-এর variance আর standard deviation

\[ \sigma^2 = \frac{1}{N}\sum_{i=1}^{N} (x_i - \bar{x})^2 \ \ (\text{population}), \qquad s^2 = \frac{1}{n-1}\sum_{i=1}^{n} (x_i - \bar{x})^2 \ \ (\text{sample}) \]
Full worked example: Data: 2, 4, 4, 4, 5, 5, 7, 9 (treat as a population, \(N = 8\)).
Step 1 — mean: \( \bar{x} = \frac{2+4+4+4+5+5+7+9}{8} = \frac{40}{8} = 5 \).
Step 2 — deviations from 5: −3, −1, −1, −1, 0, 0, 2, 4.
Step 3 — squared: 9, 1, 1, 1, 0, 0, 4, 16. Sum = 32.
Step 4 — variance: \( \sigma^2 = \frac{32}{8} = 4 \). Standard deviation: \( \sigma = \sqrt{4} = 2 \).
If this were a sample: \( s^2 = \frac{32}{7} \approx 4.571 \), \( s \approx 2.138 \).
Full worked example: Data: 2, 4, 4, 4, 5, 5, 7, 9 (population ধরো, \(N = 8\))।
Step 1 — mean: \( \bar{x} = \frac{40}{8} = 5 \)।
Step 2 — 5 থেকে deviation: −3, −1, −1, −1, 0, 0, 2, 4।
Step 3 — square: 9, 1, 1, 1, 0, 0, 4, 16। Sum = 32।
Step 4 — variance: \( \sigma^2 = \frac{32}{8} = 4 \)। Standard deviation: \( \sigma = 2 \)।
এটা sample হলে: \( s^2 = \frac{32}{7} \approx 4.571 \), \( s \approx 2.138 \)।

Population vs samplePopulation বনাম sample

A population is the whole group you care about. A sample is the part you actually measured. When estimating a population's variance from a sample, divide by \(n - 1\) instead of \(n\) (Bessel's correction) — a sample tends to underestimate the spread, and \(n-1\) fixes that on average.

Population হলো পুরো group যেটা নিয়ে তুমি ভাবছ। Sample হলো যতটুকু আসলে measure করেছ। Sample থেকে population-এর variance estimate করার সময় \(n\)-এর বদলে \(n - 1\) দিয়ে ভাগ করো (Bessel's correction) — sample সাধারণত spread-কে কম দেখায়, আর \(n-1\) গড়ে সেটা ঠিক করে দেয়।

Correlation (the idea)Correlation (idea-টা)

Correlation \(r\) measures how two variables move together. \( -1 \le r \le 1 \).

  • \( r \approx +1 \): move together (study hours vs marks).
  • \( r \approx -1 \): move oppositely (price vs demand).
  • \( r \approx 0 \): no linear relationship.

Important: correlation does not prove causation. Ice-cream sales and drowning are correlated — the hidden cause is summer.

Correlation \(r\) মাপে দুইটা variable একসাথে কেমন চলে। \( -1 \le r \le 1 \)।

  • \( r \approx +1 \): একসাথে বাড়ে (study hours বনাম marks)।
  • \( r \approx -1 \): উল্টোদিকে চলে (price বনাম demand)।
  • \( r \approx 0 \): কোনো linear relationship নেই।

গুরুত্বপূর্ণ: correlation মানেই causation না। Ice-cream বিক্রি আর drowning correlated — লুকানো cause হলো summer।

Exam tip: Read carefully whether the question says "population" or "sample" — the divisor (\(N\) vs \(n-1\)) changes the answer. If the question is silent and gives the full data set, use the population formula.
Exam tip: প্রশ্নে "population" নাকি "sample" লেখা — মন দিয়ে পড়ো — divisor (\(N\) নাকি \(n-1\)) answer বদলে দেয়। প্রশ্নে কিছু বলা না থাকলে এবং পুরো data set দেওয়া থাকলে population formula ব্যবহার করো।

Practice Questions (Admission Style)Practice Questions (Admission Style)

17 questions, easy to hard. Try each one on paper before opening the answer. 17টা প্রশ্ন, সহজ থেকে কঠিন। Answer খোলার আগে প্রতিটা কাগজে try করো।

Q1. What is \( 1 + 2 + 3 + \dots + 100 \)?
  • (a) 4950
  • (b) 5000
  • (c) 5050
  • (d) 5500
Q1. \( 1 + 2 + 3 + \dots + 100 \) কত?
  • (a) 4950
  • (b) 5000
  • (c) 5050
  • (d) 5500
Show Answerউত্তর দেখুন
Answer: (c) — Use \( \sum_{k=1}^{n} k = \frac{n(n+1)}{2} \). Here \( \frac{100 \times 101}{2} = 50 \times 101 = 5050 \).
Answer: (c) — \( \sum_{k=1}^{n} k = \frac{n(n+1)}{2} \) ব্যবহার করো। এখানে \( \frac{100 \times 101}{2} = 5050 \)।
Q2. \( \binom{10}{3} = \) ?
  • (a) 720
  • (b) 120
  • (c) 210
  • (d) 30
Q2. \( \binom{10}{3} = \) কত?
  • (a) 720
  • (b) 120
  • (c) 210
  • (d) 30
Show Answerউত্তর দেখুন
Answer: (b) — \( \binom{10}{3} = \frac{10 \times 9 \times 8}{3!} = \frac{720}{6} = 120 \). Option (a) 720 is \( {}^{10}P_3 \), the permutation — a classic trap.
Answer: (b) — \( \binom{10}{3} = \frac{10 \times 9 \times 8}{3!} = \frac{720}{6} = 120 \)। Option (a) 720 হলো \( {}^{10}P_3 \), মানে permutation — classic trap।
Q3. Two fair dice are rolled. What is the probability that the sum is 7?
  • (a) 1/12
  • (b) 1/9
  • (c) 1/6
  • (d) 1/4
Q3. দুইটা fair dice roll করা হলো। Sum 7 হওয়ার probability কত?
  • (a) 1/12
  • (b) 1/9
  • (c) 1/6
  • (d) 1/4
Show Answerউত্তর দেখুন
Answer: (c) — Total outcomes = 36. Pairs giving 7: (1,6), (2,5), (3,4), (4,3), (5,2), (6,1) = 6 pairs. \( P = \frac{6}{36} = \frac{1}{6} \).
Answer: (c) — মোট outcome = 36। Sum 7 দেয় এমন pair: (1,6), (2,5), (3,4), (4,3), (5,2), (6,1) = 6টা। \( P = \frac{6}{36} = \frac{1}{6} \)।
Q4. In how many ways can 6 people sit around a round table?
  • (a) 720
  • (b) 120
  • (c) 360
  • (d) 60
Q4. 6 জন মানুষ একটা গোল টেবিলে কত ভাবে বসতে পারে?
  • (a) 720
  • (b) 120
  • (c) 360
  • (d) 60
Show Answerউত্তর দেখুন
Answer: (b) — Circular permutation: \( (n-1)! = 5! = 120 \). We fix one person so that rotations are not counted again. 720 (\(= 6!\)) would be for a straight row.
Answer: (b) — Circular permutation: \( (n-1)! = 5! = 120 \)। একজনকে fix করি যেন rotation আবার গোনা না হয়। 720 (\(= 6!\)) হতো সোজা লাইনে বসালে।
Q5. (Written) Find the sum of the geometric series \( 3 + 6 + 12 + \dots + 384 \).
Q5. (Written) Geometric series \( 3 + 6 + 12 + \dots + 384 \)-এর sum বের করো।
Show Answerউত্তর দেখুন
Answer: 765 — Here \( a = 3 \), \( r = 2 \). Find \(n\): \( 3 \cdot 2^{n-1} = 384 \Rightarrow 2^{n-1} = 128 = 2^7 \Rightarrow n = 8 \).
\( S_8 = 3 \cdot \frac{2^8 - 1}{2 - 1} = 3 \times 255 = 765 \).
Answer: 765 — এখানে \( a = 3 \), \( r = 2 \)। \(n\) বের করো: \( 3 \cdot 2^{n-1} = 384 \Rightarrow 2^{n-1} = 128 = 2^7 \Rightarrow n = 8 \)।
\( S_8 = 3 \cdot \frac{2^8 - 1}{2 - 1} = 3 \times 255 = 765 \)।
Q6. \(A\) and \(B\) are mutually exclusive, \( P(A) = 0.3 \), \( P(B) = 0.4 \). What is \( P(A \cup B) \)?
  • (a) 0.12
  • (b) 0.58
  • (c) 0.7
  • (d) 1.0
Q6. \(A\) আর \(B\) mutually exclusive, \( P(A) = 0.3 \), \( P(B) = 0.4 \)। \( P(A \cup B) \) কত?
  • (a) 0.12
  • (b) 0.58
  • (c) 0.7
  • (d) 1.0
Show Answerউত্তর দেখুন
Answer: (c) — Mutually exclusive means \( P(A \cap B) = 0 \), so \( P(A \cup B) = 0.3 + 0.4 - 0 = 0.7 \). Option (b) 0.58 assumes independence (\(0.7 - 0.12\)) — the trap. Mutually exclusive is not independent.
Answer: (c) — Mutually exclusive মানে \( P(A \cap B) = 0 \), তাই \( P(A \cup B) = 0.3 + 0.4 - 0 = 0.7 \)। Option (b) 0.58 ধরে নেয় independence (\(0.7 - 0.12\)) — এটাই trap। Mutually exclusive মানে independent না।
Q7. (Written) How many different arrangements does the word STATISTICS have?
Q7. (Written) STATISTICS শব্দটার কতগুলো আলাদা arrangement আছে?
Show Answerউত্তর দেখুন
Answer: 50400 — Letters: S,T,A,T,I,S,T,I,C,S → 10 letters. S appears 3 times, T appears 3 times, I appears 2 times, A and C once each.
\[ \frac{10!}{3!\,3!\,2!} = \frac{3628800}{6 \times 6 \times 2} = \frac{3628800}{72} = 50400 \]
Answer: 50400 — Letters: S,T,A,T,I,S,T,I,C,S → 10টা letter। S আছে 3 বার, T আছে 3 বার, I আছে 2 বার, A আর C একবার করে।
\[ \frac{10!}{3!\,3!\,2!} = \frac{3628800}{72} = 50400 \]
Q8. A fair coin is tossed 3 times. The probability of getting at least one head is:
  • (a) 1/2
  • (b) 3/8
  • (c) 5/8
  • (d) 7/8
Q8. একটা fair coin 3 বার toss করা হলো। At least one head পাওয়ার probability:
  • (a) 1/2
  • (b) 3/8
  • (c) 5/8
  • (d) 7/8
Show Answerউত্তর দেখুন
Answer: (d) — Complement: \( P(\text{no head}) = P(\text{TTT}) = \frac{1}{8} \). So \( P(\text{at least one H}) = 1 - \frac{1}{8} = \frac{7}{8} \).
Answer: (d) — Complement: \( P(\text{no head}) = P(\text{TTT}) = \frac{1}{8} \)। তাই \( P(\text{at least one H}) = 1 - \frac{1}{8} = \frac{7}{8} \)।
Q9. (Written) Solve the recurrence \( T(n) = 2T(n-1) + 1 \) with \( T(1) = 1 \). Give a closed form and verify it.
Q9. (Written) \( T(n) = 2T(n-1) + 1 \), \( T(1) = 1 \) recurrence-টা solve করো। Closed form দাও এবং verify করো।
Show Answerউত্তর দেখুন
Answer: \( T(n) = 2^n - 1 \) — Small cases: \( T(1)=1,\ T(2)=3,\ T(3)=7,\ T(4)=15 \). Pattern: \( 2^n - 1 \).
Verify in the recurrence: \( 2(2^{n-1} - 1) + 1 = 2^n - 2 + 1 = 2^n - 1 \). ✓ Base: \( 2^1 - 1 = 1 = T(1) \). ✓
(This is the Tower of Hanoi count.)
Answer: \( T(n) = 2^n - 1 \) — ছোট case: \( T(1)=1,\ T(2)=3,\ T(3)=7,\ T(4)=15 \)। Pattern: \( 2^n - 1 \)।
Recurrence-এ verify: \( 2(2^{n-1} - 1) + 1 = 2^n - 1 \)। ✓ Base: \( 2^1 - 1 = 1 = T(1) \)। ✓
(এটাই Tower of Hanoi-এর count।)
Q10. A fair coin is tossed 4 times. \( P(\text{exactly 2 heads}) = \) ?
  • (a) 1/4
  • (b) 3/8
  • (c) 1/2
  • (d) 5/8
Q10. একটা fair coin 4 বার toss করা হলো। \( P(\text{exactly 2 heads}) = \) কত?
  • (a) 1/4
  • (b) 3/8
  • (c) 1/2
  • (d) 5/8
Show Answerউত্তর দেখুন
Answer: (b) — Binomial with \( n = 4,\ p = \frac{1}{2},\ k = 2 \):
\( P = \binom{4}{2}\left(\frac{1}{2}\right)^4 = 6 \times \frac{1}{16} = \frac{6}{16} = \frac{3}{8} \).
Answer: (b) — Binomial, \( n = 4,\ p = \frac{1}{2},\ k = 2 \):
\( P = \binom{4}{2}\left(\frac{1}{2}\right)^4 = 6 \times \frac{1}{16} = \frac{3}{8} \)।
Q11. (Written) A website gets on average 3 errors per day, following a Poisson distribution. Find (i) \( P(\text{no error in a day}) \), (ii) \( P(\text{at least one error in a day}) \). Use \( e^{-3} \approx 0.0498 \).
Q11. (Written) একটা website-এ গড়ে দিনে 3টা error হয়, Poisson distribution মেনে। বের করো (i) \( P(\text{no error in a day}) \), (ii) \( P(\text{at least one error in a day}) \)। ধরো \( e^{-3} \approx 0.0498 \)।
Show Answerউত্তর দেখুন
Answer: (i) ≈ 0.0498, (ii) ≈ 0.9502 — With \( \lambda = 3 \):
(i) \( P(X = 0) = \frac{e^{-3} \cdot 3^0}{0!} = e^{-3} \approx 0.0498 \).
(ii) \( P(X \ge 1) = 1 - P(X = 0) = 1 - 0.0498 = 0.9502 \). "At least one" almost always goes through the complement.
Answer: (i) ≈ 0.0498, (ii) ≈ 0.9502 — \( \lambda = 3 \) দিয়ে:
(i) \( P(X = 0) = e^{-3} \approx 0.0498 \)।
(ii) \( P(X \ge 1) = 1 - P(X = 0) = 0.9502 \)। "At least one" প্রায় সবসময় complement দিয়ে করা হয়।
Q12. The variance of one fair die roll is:
  • (a) 2.5
  • (b) 35/12
  • (c) 3.5
  • (d) 91/6
Q12. একটা fair die roll-এর variance কত?
  • (a) 2.5
  • (b) 35/12
  • (c) 3.5
  • (d) 91/6
Show Answerউত্তর দেখুন
Answer: (b) — \( E[X] = 3.5 \), \( E[X^2] = \frac{91}{6} \). \( \operatorname{Var}(X) = \frac{91}{6} - 3.5^2 = \frac{91}{6} - \frac{49}{4} = \frac{182 - 147}{12} = \frac{35}{12} \approx 2.92 \). Option (c) is the mean; (d) is \(E[X^2]\) — both traps.
Answer: (b) — \( E[X] = 3.5 \), \( E[X^2] = \frac{91}{6} \)। \( \operatorname{Var}(X) = \frac{91}{6} - \frac{49}{4} = \frac{35}{12} \approx 2.92 \)। Option (c) হলো mean; (d) হলো \(E[X^2]\) — দুটোই trap।
Q13. (Written) Two cards are drawn from a standard 52-card deck without replacement. Find the probability that both are aces.
Q13. (Written) একটা standard 52-card deck থেকে replacement ছাড়া দুইটা card টানা হলো। দুটোই ace হওয়ার probability বের করো।
Show Answerউত্তর দেখুন
Answer: 1/221 — Multiplication rule: \( P = \frac{4}{52} \times \frac{3}{51} = \frac{12}{2652} = \frac{1}{221} \approx 0.0045 \).
Alternative by combinations: \( \frac{\binom{4}{2}}{\binom{52}{2}} = \frac{6}{1326} = \frac{1}{221} \). Same answer, two methods — good for checking.
Answer: 1/221 — Multiplication rule: \( P = \frac{4}{52} \times \frac{3}{51} = \frac{1}{221} \approx 0.0045 \)।
Combination দিয়েও করা যায়: \( \frac{\binom{4}{2}}{\binom{52}{2}} = \frac{6}{1326} = \frac{1}{221} \)। একই answer, দুই method — check করার জন্য ভালো।
Q14. (Written) In a factory, machine A produces 60% of items with a 2% defect rate; machine B produces 40% with a 5% defect rate. A randomly picked item is found defective. What is the probability it was made by machine B?
Q14. (Written) একটা factory-তে machine A বানায় 60% item, defect rate 2%; machine B বানায় 40%, defect rate 5%। Random একটা item defective পাওয়া গেল। এটা machine B-এর বানানো হওয়ার probability কত?
Show Answerউত্তর দেখুন
Answer: 0.625 — Bayes theorem.
Priors: \( P(A) = 0.6,\ P(B) = 0.4 \). Conditionals: \( P(D \mid A) = 0.02,\ P(D \mid B) = 0.05 \).
Total: \( P(D) = (0.6)(0.02) + (0.4)(0.05) = 0.012 + 0.020 = 0.032 \).
\( P(B \mid D) = \frac{0.020}{0.032} = \frac{5}{8} = 0.625 \).
B makes fewer items but far more of the defects, so the defective item points to B.
Answer: 0.625 — Bayes theorem।
Prior: \( P(A) = 0.6,\ P(B) = 0.4 \)। Conditional: \( P(D \mid A) = 0.02,\ P(D \mid B) = 0.05 \)।
Total: \( P(D) = 0.012 + 0.020 = 0.032 \)।
\( P(B \mid D) = \frac{0.020}{0.032} = \frac{5}{8} = 0.625 \)।
B কম item বানালেও defect-এর বড় অংশ B-এর, তাই defective item টা B-এর দিকেই point করে।
Q15. (Written) A discrete random variable \(X\) has PMF: \( P(X=1) = 0.2 \), \( P(X=2) = 0.5 \), \( P(X=3) = 0.3 \). Find \( E[X] \), \( E[X^2] \), \( \operatorname{Var}(X) \), and the standard deviation.
Q15. (Written) একটা discrete random variable \(X\)-এর PMF: \( P(X=1) = 0.2 \), \( P(X=2) = 0.5 \), \( P(X=3) = 0.3 \)। \( E[X] \), \( E[X^2] \), \( \operatorname{Var}(X) \) আর standard deviation বের করো।
Show Answerউত্তর দেখুন
Answer: \( E[X] = 2.1,\ E[X^2] = 4.9,\ \operatorname{Var}(X) = 0.49,\ \sigma = 0.7 \)
Check PMF first: \( 0.2 + 0.5 + 0.3 = 1 \). ✓
\( E[X] = 1(0.2) + 2(0.5) + 3(0.3) = 0.2 + 1.0 + 0.9 = 2.1 \).
\( E[X^2] = 1(0.2) + 4(0.5) + 9(0.3) = 0.2 + 2.0 + 2.7 = 4.9 \).
\( \operatorname{Var}(X) = 4.9 - (2.1)^2 = 4.9 - 4.41 = 0.49 \).
\( \sigma = \sqrt{0.49} = 0.7 \).
Answer: \( E[X] = 2.1,\ E[X^2] = 4.9,\ \operatorname{Var}(X) = 0.49,\ \sigma = 0.7 \)
আগে PMF check: \( 0.2 + 0.5 + 0.3 = 1 \)। ✓
\( E[X] = 1(0.2) + 2(0.5) + 3(0.3) = 2.1 \)।
\( E[X^2] = 1(0.2) + 4(0.5) + 9(0.3) = 4.9 \)।
\( \operatorname{Var}(X) = 4.9 - (2.1)^2 = 0.49 \)।
\( \sigma = \sqrt{0.49} = 0.7 \)।
Q16. (Real exam style — asked April 2024) A fair coin is tossed 4 times. What is the probability that the sequence contains a run of at least 3 consecutive heads?
  • (a) 1/8
  • (b) 3/16
  • (c) 1/4
  • (d) 5/16
Q16. (Real exam style — asked April 2024) একটা fair coin 4 বার toss করা হলো। Sequence-এ at least 3টা consecutive heads-এর একটা run থাকার probability কত?
  • (a) 1/8
  • (b) 3/16
  • (c) 1/4
  • (d) 5/16
Show Answerউত্তর দেখুন
Answer: (b) — Enumerate. Total outcomes: \( 2^4 = 16 \).
We need HHH somewhere inside 4 tosses. The block HHH can start at position 1 or position 2.
Start at 1: HHHH, HHHT. Start at 2: THHH. (HHHH is already counted, so do not count it again.)
Favourable outcomes: HHHH, HHHT, THHH — exactly 3.
\( P = \frac{3}{16} \).
Trap check: HHTH and HTHH have 3 heads in total but never 3 in a row, so they do not count. A run needs consecutive heads.
Answer: (b) — Enumerate করো। মোট outcome: \( 2^4 = 16 \)।
4টা toss-এর ভেতরে কোথাও HHH দরকার। HHH block-টা position 1 বা position 2-এ শুরু হতে পারে।
Position 1-এ শুরু: HHHH, HHHT। Position 2-এ শুরু: THHH। (HHHH আগেই গোনা হয়েছে, তাই আবার গুনো না।)
Favourable outcome: HHHH, HHHT, THHH — ঠিক 3টা।
\( P = \frac{3}{16} \)।
Trap check: HHTH আর HTHH-তে মোট 3টা head আছে, কিন্তু পরপর 3টা নেই — তাই এগুলো গোনা হবে না। Run মানে consecutive heads লাগবে।
Q17. (Written) (Real exam style — asked April 2024) A fair coin is tossed 10 times. Using indicator variables, find the expected number of runs in the sequence. (A run is a maximal block of identical outcomes.)
Q17. (Written) (Real exam style — asked April 2024) একটা fair coin 10 বার toss করা হলো। Indicator variable ব্যবহার করে sequence-টার expected number of runs বের করো। (Run হলো পরপর একই outcome-এর একটা maximal block।)
Show Answerউত্তর দেখুন
Answer: 5.5
Step 1 — the first toss always starts a run. That contributes 1.
Step 2 — there are \( 10 - 1 = 9 \) boundaries between neighbouring tosses. For boundary \( i \), let \( X_i = 1 \) if toss \( i+1 \) differs from toss \( i \) (a new run starts), else 0.
Step 3 — for a fair coin, the two neighbouring tosses differ with probability \( \frac{1}{2} \), so \( E[X_i] = \frac{1}{2} \).
Step 4 — linearity of expectation (independence not needed):
\[ E[\text{runs}] = 1 + \sum_{i=1}^{9} E[X_i] = 1 + 9 \times \frac{1}{2} = 1 + 4.5 = 5.5 \] Quick sanity check with the general formula \( E[\text{runs}] = 1 + \frac{n-1}{2} \): for \( n = 10 \), \( 1 + \frac{9}{2} = 5.5 \). Correct.
Answer: 5.5
Step 1 — প্রথম toss সবসময় একটা run শুরু করে। সেখান থেকে আসে 1।
Step 2 — পাশাপাশি toss-গুলোর মাঝে \( 10 - 1 = 9 \)টা boundary আছে। Boundary \( i \)-এর জন্য ধরো \( X_i = 1 \) যদি toss \( i+1 \) toss \( i \) থেকে আলাদা হয় (নতুন run শুরু হয়), নাহলে 0।
Step 3 — fair coin-এ পাশাপাশি দুই toss আলাদা হওয়ার probability \( \frac{1}{2} \), তাই \( E[X_i] = \frac{1}{2} \)।
Step 4 — linearity of expectation (independence লাগে না):
\[ E[\text{runs}] = 1 + \sum_{i=1}^{9} E[X_i] = 1 + 9 \times \frac{1}{2} = 5.5 \] General formula \( E[\text{runs}] = 1 + \frac{n-1}{2} \) দিয়ে quick check: \( n = 10 \) হলে \( 1 + \frac{9}{2} = 5.5 \)। ঠিক আছে।