Skip to content
Prev Previous commit
Next Next commit
Updated the questions with fixes(added new supported notations)
  • Loading branch information
Jeet009 committed Sep 15, 2025
commit b903254ac5765bb07ee926b542ef85a968289e64
31 changes: 20 additions & 11 deletions questions/185_pmf_normalization_constant 2/learn.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
## Learning: PMF normalization constant

### Idea and formula
- **PMF requirement**: A probability mass function must satisfy p(xᵢ) = 1 and p(xᵢ) ≥ 0.
- **Normalization by a constant**: If probabilities are given up to a constant, you determine that constant by enforcing the sum-to-1 constraint.
- If the form is p(xᵢ) = K · wᵢ with known nonnegative weights wᵢ, then
- p(xᵢ) = K · ∑ wᵢ = 1 ⇒ **K = 1 / ∑ wᵢ**.
- If the given expressions involve K in a more general way (e.g., both K and terms), still enforce p(xᵢ) = 1 and solve the resulting equation for K. Choose the solution that makes all probabilities nonnegative.
- **PMF requirement**: A probability mass function must satisfy $\sum_i p(x_i) = 1$ and $p(x_i) \ge 0$.
- **Normalization by a constant**: If probabilities are given up to a constant, determine that constant by enforcing the sum-to-1 constraint.
- If the form is $p(x_i) = K\,w_i$ with known nonnegative weights $w_i$, then
- $\sum_i p(x_i) = K \sum_i w_i = 1 \Rightarrow$ $\displaystyle K = \frac{1}{\sum_i w_i}$.
- If the given expressions involve $K$ in a more general way (e.g., both $K$ and $K^2$ terms), still enforce $\sum_i p(x_i) = 1$ and solve the resulting equation for $K$. Choose the solution that makes all probabilities nonnegative.

### Worked example (this question)
Suppose the PMF entries are expressed in terms of K such that, when summed, the K-terms group as follows:
Expand All @@ -23,19 +23,28 @@ One concrete way to realize this is via the following table of outcomes and prob
| x₄ | 3K + 7K² |
| x₅ | K |

These add up to 9K + 10K² as required.
These add up to $9K + 10K^2$ as required.

Enforce the PMF constraint:

- 9K + 10K² = 1 ⇒ 10K² + 9K − 1 = 0
$$
9K + 10K^2 = 1 \;\Rightarrow\; 10K^2 + 9K - 1 = 0
$$

Quadratic formula reminder:

- For aK² + bK + c = 0, the solutions are K = [−b ± √(b² − 4ac)] / (2a).
$$
\text{For } aK^2 + bK + c = 0,\quad K = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}.
$$

Solve the quadratic:

- K = [−9 ± √(9² + 4·10·1)] / (2·10) = [−9 ± √121] / 20 = [−9 ± 11] / 20
- Feasible (K ≥ 0) root: K = (−9 + 11) / 20 = 2/20 = 0.1
$$
K = \frac{-9 \pm \sqrt{9^2 - 4\cdot 10 \cdot (-1)}}{2\cdot 10}
= \frac{-9 \pm \sqrt{121}}{20}
= \frac{-9 \pm 11}{20}.
$$

Therefore, the normalization constant is **K = 0.1**.
Feasible ($K \ge 0$) root: $\displaystyle K = \frac{2}{20} = 0.1$.

Therefore, the normalization constant is **$K = 0.1$**.