# C2 W3 Quiz question

**URL:** <https://community.deeplearning.ai/t/c2-w3-quiz-question/717477>\
**Category:** Improving Deep Neural Networks: Hyperparameter tun\
**Tags:** week-module-3, coursera-platform\
**Created:** [November 2, 2024, 2:39pm UTC](https://community.deeplearning.ai/t/c2-w3-quiz-question/717477 "2024-11-02T14:39:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jakhon77](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/jakhon77/32/128024_2.png) [@jakhon77](https://community.deeplearning.ai/u/jakhon77)\
**Post date:** [November 2, 2024, 2:39pm UTC](https://community.deeplearning.ai/t/c2-w3-quiz-question/717477/1 "2024-11-02T14:39:31Z")

</div>

Hello,

Here is a question from the quiz:

“If you think  
β  
β (hyperparameter for momentum) is between 0.9 and 0.99, which of the following is the recommended way to sample a value for beta?”

Based on the lecture, I believe, the answer is supposed to be beta = 1-10\*\*r where r=[-2,-1]. However, I don’t see this in the answer options. What range of values are being assumed for r in the provided answer options? Can someone please explain me what I am missing here? By the way, I know the right answer but I cannot understand/accept it.  
Thank you!

---

<div class="post-metadata">

**Author:** ![paulinpaloalto](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/paulinpaloalto/32/187_2.png) [@paulinpaloalto](https://community.deeplearning.ai/u/paulinpaloalto)\
**Post date:** [November 2, 2024, 6:23pm UTC](https://community.deeplearning.ai/t/c2-w3-quiz-question/717477/2 "2024-11-02T18:23:15Z")

</div>

I took that quiz and I did see one of the answers that is basically equivalent to what you describe. Remember that the output of

`r = np.random.rand()`

will be a number between 0 and 1.

But these quizzes are dynamic and there can be different versions of the various questions, so perhaps I just got lucky.

---

<div class="post-metadata">

**Author:** ![jakhon77](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/jakhon77/32/128024_2.png) [@jakhon77](https://community.deeplearning.ai/u/jakhon77)\
**Post date:** [November 3, 2024, 3:46am UTC](https://community.deeplearning.ai/t/c2-w3-quiz-question/717477/3 "2024-11-03T03:46:13Z")

</div>

Understood now. Thank you!
