QuantEcon / lecture-source-py

Source files for "Lectures in Quantitative Economics" -- Python version
BSD 3-Clause "New" or "Revised" License
191 stars 77 forks source link

Revert "functions_exercise_issue" #949

Closed shlff closed 4 years ago

shlff commented 4 years ago

Reverts QuantEcon/lecture-source-py#948

Thanks for your work, @sayaikegawa .

Hi @jstac , @sayaikegawa and I had a discussion about this change this morning, and we found that , in the lecture, the Exercise 3 and its solution code do not match with these new changes, where the solution code implies that If a head occurs consecutively k or more times within this sequence, pay one dollar., while the Exercise 3 with these new changes says that If a head occurs more than k times consecutively within this sequence at least once, pay one dollar.

We are going to re-modify the statement in Exercise 3 a little bit to match the code. Do you think it is a good idea?

sayaikegawa commented 4 years ago

Thanks @shlff , I think that the statement of first random device "If a head consecutively occurs k or more times within this sequence" still needs to say "If a head consecutively occurs k or more times within this sequence at least once", otherwise it would be confusing about whether we should set payoff equals 1+1 =2 when {head, head, head, tail, head, head, head, head, tail, tail} occurs.

shlff commented 4 years ago

Thanks @shlff , I think that the statement of first random device "If a head consecutively occurs k or more times within this sequence" still needs to say "If a head consecutively occurs k or more times within this sequence at least once", otherwise it would be confusing about whether we should set payoff equals 1+1 =2 when {head, head, head, tail, head, head, head, head, tail, tail} occurs.

Thanks, @sayaikegawa . I think that is a good idea. I will take your suggestion.

shlff commented 4 years ago

Good afternoon, @jstac . Here's the ipynb file compiled from the rst file of lecture [functions] with all changes made in this PR. Thanks for your comments and @sayaikegawa 's. Now I am confident that this PR is ready to merge.

Would you mind reviewing these changes and confirm it? Have a nice day!

jstac commented 4 years ago

Very good PR. Nice work @shlff and @sayaikegawa