Skip to content
Open
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(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
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here are the rules for the learn section and how to create formulas, also currently we do not render charts on the site

Writing Mathematical Expressions with LaTeX

This editor supports LaTeX for rendering mathematical equations and expressions. Here's how you can use it:

  1. Inline Math:

    • Wrap your expression with single $ symbols.
    • Example: $E = mc^2$ → Renders as: ( $E = mc^2$ )
  2. Block Math:

    • Wrap your expression with double $$ symbols.
    • Example:
      $$
      \int_a^b f(x) \, dx
      $$
      
      Renders as:
      $$
      \int_a^b f(x) , dx
      $$
  3. Math Functions:

    • Use standard LaTeX functions like \frac, \sqrt, \sum, etc.
    • Examples:
      • $\frac{a}{b}$ → ( $\frac{a}{b}$ )
      • $\sqrt{x}$ → ( $\sqrt{x}$ )
  4. Greek Letters and Symbols:

    • Use commands like \alpha, \beta, etc., for Greek letters.
    • Example: $\alpha + \beta = \gamma$ → ( $\alpha + \beta = \gamma$ )
  5. Subscripts and Superscripts:

    • Use _{} for subscripts and ^{} for superscripts.
    • Examples:
      • $x_i$ → ( $x_i$ )
      • $x^2$ → ( $x^2$ )
  6. Combined Examples:

    • $\sum_{i=1}^n i^2 = \frac{n(n+1)(2n+1)}{6}$
      Renders as:
      $\sum_{i=1}^n i^2 = \frac{n(n+1)(2n+1)}{6}$

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @Open-Deep-ML, thanks for this. I have updated the notations in LaTeX format. Please take a look and let me know if this is fine now.


### 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$**.