<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="3.10.0">Jekyll</generator><link href="https://valentioiverson.github.io/feed.xml" rel="self" type="application/atom+xml" /><link href="https://valentioiverson.github.io/" rel="alternate" type="text/html" /><updated>2026-09-25T19:02:03+00:00</updated><id>https://valentioiverson.github.io/feed.xml</id><title type="html">Valentio Iverson</title><subtitle>PhD in EECS at MIT with interest in learning theory</subtitle><author><name>Valentio Iverson</name><email>viverson@mit.edu</email></author><entry><title type="html">Sampling 1</title><link href="https://valentioiverson.github.io/sampling-1/" rel="alternate" type="text/html" title="Sampling 1" /><published>2025-05-01T00:00:00+00:00</published><updated>2025-05-01T00:00:00+00:00</updated><id>https://valentioiverson.github.io/sampling-1</id><content type="html" xml:base="https://valentioiverson.github.io/sampling-1/"><![CDATA[<script type="text/javascript">
  MathJax = {
    tex: {
      inlineMath: [['$', '$'], ['\\(', '\\)']],
      displayMath: [['$$', '$$'], ['\\[', '\\]']]
    },
    options: {
      skipHtmlTags: ['script', 'noscript', 'style', 'textarea', 'pre'],
      ignoreHtmlClass: 'tex2jax_ignore',
      processHtmlClass: 'tex2jax_process'
    }
  };
</script>

<script type="text/javascript" async="" src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js">
</script>

<p>Just a template for now — will update soon enough.</p>

<p>\(\gcd(a^n + b, b^n + a)\)
is eventually constant. So will $(1,1)$ work?</p>

<p>Imagine you want to compute the area under a tricky curve, like $f(x) = \sin(x^2)$, from $x = 0$ to $x = 1$. Analytically, it’s a mess. Monte Carlo makes it simple:</p>

<ol>
  <li>Generate random points $(x, y)$ in a rectangle containing the curve (e.g., $x \in [0, 1]$, $y \in [0, 1]$).</li>
  <li>Check if each point lies below the curve ($y \leq f(x)$).</li>
  <li>The fraction of points below the curve, multiplied by the rectangle’s area, approximates the integral.</li>
</ol>

<p>Mathematically, if you sample $N$ points and $M$ fall below the curve, the area is roughly:</p>

\[\text{Area} \approx \frac{M}{N} \cdot \text{Rectangle Area}\]

<p>As $N$ grows, the approximation gets better, thanks to the law of large numbers.</p>

<h2 id="why-are-they-cool">Why Are They Cool?</h2>

<p>Monte Carlo methods shine in high-dimensional problems, like those in machine learning or physics. For example:</p>

<ul>
  <li><strong>Bayesian Inference</strong>: Estimating posterior distributions in probabilistic models.</li>
  <li><strong>Optimization</strong>: Approximating gradients in complex loss landscapes.</li>
  <li><strong>Physics Simulations</strong>: Modeling particle interactions in statistical mechanics.</li>
</ul>

<p>The catch? They can be slow to converge (think $O(1/\sqrt{N})$ error), but their simplicity and flexibility make them a go-to tool.</p>

<h2 id="a-fun-example">A Fun Example</h2>

<p>Suppose you want to estimate $\pi$ using Monte Carlo. Draw a unit square ($1 \times 1$) and a quarter-circle inside it (radius 1, centered at $(0, 0)$). Generate random points in the square and count how many fall inside the quarter-circle. Since the quarter-circle’s area is $\pi/4$, the ratio of “hits” to total points, multiplied by 4, approximates $\pi$:</p>

\[\pi \approx 4 \cdot \frac{\text{Points inside quarter-circle}}{\text{Total points}}\]]]></content><author><name>Valentio Iverson</name><email>viverson@mit.edu</email></author><category term="mathematics" /><category term="machine-learning" /><category term="sampling" /><summary type="html"><![CDATA[Starting my journey to log concave sampling]]></summary></entry></feed>