<p>Being confused about the example of Combining Stratified Sampling and Importance Sampling in <em>Advanced Global Illumination</em> (P72,P73).</p>

<p><a href="https://i.sstatic.net/bskvn.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/bskvn.png" alt="enter image description here"></a>
<a href="https://i.sstatic.net/huQTU.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/huQTU.png" alt="enter image description here"></a></p>

<p>I know how to do importance sampling and stratified sampling. But I can't understand this example and the code.</p>

<p>Is this example to calculate $S$ stochastically or to get a random number $u$?</p>

<p>What is the $u$ for?</p>

<p>What's the meaning of "Sample the $i$th term of the sum $N_i$ times"?</p>

CC BY-SA 3.0
2017-08-08T22:22:48.520Z
Can you clarify your question? Just saying "I'm confused" doesn't give us much to go on. What do you understand already, what don't you understand, what specific questions do you have?
Nathan Reed
CC BY-SA 3.0
2017-08-09T01:11:22.820Z
I don't understand what the question is.
Julien Guertault
CC BY-SA 3.0
2017-08-09T13:46:44.183Z
@NathanReed Question updated.
chaosink
CC BY-SA 3.0
2017-08-09T13:48:20.757Z
@JulienGuertault Question updated.
chaosink
<sampling><importance-sampling>
An example of Combining Stratified Sampling and Importance Sampling in AGI
chaosink
# An example of Combining Stratified Sampling and Importance Sampling in AGI

(Asked by: username_0 on 2017-08-08)

Being confused about the example of Combining Stratified Sampling and Importance Sampling in *Advanced Global Illumination* (P72,P73).

[![enter image description here](https://i.sstatic.net/bskvn.png)](https://i.sstatic.net/bskvn.png)
[![enter image description here](https://i.sstatic.net/huQTU.png)](https://i.sstatic.net/huQTU.png)

I know how to do importance sampling and stratified sampling. But I can't understand this example and the code.

Is this example to calculate $S$ stochastically or to get a random number $u$?

What is the $u$ for?

What's the meaning of "Sample the $i$th term of the sum $N\_i$ times"?

**Tags:** sampling, importance-sampling

> **Comments:**
> **username_1**: Can you clarify your question? Just saying "I'm confused" doesn't give us much to go on. What do you understand already, what don't you understand, what specific questions do you have?  
> **username_2**: I don't understand what the question is.  
> **username_0**: @username_1 Question updated.  
> **username_0**: @username_2 Question updated.  

---

## 0 answers

