Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Updated the questions with fixes
  • Loading branch information
Jeet009 committed Sep 15, 2025
commit b1d2a464212381175bdacad2fc8c1f3c42de2f75
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"id": "182",
"id": "184",
"title": "Empirical Probability Mass Function (PMF)",
"difficulty": "easy",
"category": "Probability & Statistics",
Expand All @@ -8,8 +8,8 @@
"dislikes": "0",
"contributor": [
{
"profile_link": "https://github.com/jeetmukherjee",
"name": "jeetmukherjee"
"profile_link": "https://github.com/Jeet009",
"name": "Jeet Mukherjee"
}
]
}
41 changes: 33 additions & 8 deletions questions/185_pmf_normalization_constant 2/learn.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,41 @@
## Solution Explanation
## Learning: PMF normalization constant

For a valid PMF, probabilities must sum to 1.
### 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 K² terms), still enforce ∑ p(xᵢ) = 1 and solve the resulting equation for K. Choose the solution that makes all probabilities nonnegative.

Sum all terms:
### Worked example (this question)
Suppose the PMF entries are expressed in terms of K such that, when summed, the K-terms group as follows:

- Linear in K: K + 2K + 2K + 3K + K = 9K
- Quadratic in K: K^2 + 2K^2 + 7K^2 = 10K^2
- Quadratic in K: K² + 2K² + 7K² = 10K²

Therefore: 10K^2 + 9K = 1 => 10K^2 + 9K - 1 = 0
One concrete way to realize this is via the following table of outcomes and probabilities:

Solve the quadratic: K = [-9 ± sqrt(81 + 40)] / 20 = [-9 ± 11] / 20
| X | p(X) |
|----|--------------|
| x₁ | K + K² |
| x₂ | 2K + 2K² |
| x₃ | 2K |
| x₄ | 3K + 7K² |
| x₅ | K |

Feasible solution (K ≥ 0): K = 2/20 = 0.1
These add up to 9K + 10K² as required.

So the normalization constant is K = 0.1.
Enforce the PMF constraint:

- 9K + 10K² = 1 ⇒ 10K² + 9K − 1 = 0

Quadratic formula reminder:

- For aK² + bK + c = 0, the solutions are K = [−b ± √(b² − 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

Therefore, the normalization constant is **K = 0.1**.
8 changes: 4 additions & 4 deletions questions/185_pmf_normalization_constant 2/meta.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"id": "183",
"id": "185",
"title": "Find PMF Normalization Constant",
"difficulty": "easy",
"difficulty": "medium",
"category": "Probability & Statistics",
"video": "",
"likes": "0",
"dislikes": "0",
"contributor": [
{
"profile_link": "https://github.com/jeetmukherjee",
"name": "jeetmukherjee"
"profile_link": "https://github.com/Jeet009",
"name": "Jeet Mukherjee"
}
]
}