Implement Expected Value Calculations#592
Open
t1an-xyz wants to merge 3 commits intomikebryant:masterfrom
Open
Implement Expected Value Calculations#592t1an-xyz wants to merge 3 commits intomikebryant:masterfrom
t1an-xyz wants to merge 3 commits intomikebryant:masterfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds expected value calculations to help users decide when to sell turnips. Fixes issue #329.
Changes
locales/en.jsonTranslation keys needing community translation
output.chart.expectedoutput.sell-now-title,output.sell-now,output.sell-later,output.sell-adviceoutput.should-buy-title,output.should-buy,output.should-not-buy,output.buy-adviceHow it works
The expected value for time slot$i$ can be calculated using the formula
where$z$ is the pattern and $\mathbb E[X_i|Z=z]$ is the expected price at time slot $i$ given the current pattern is $z$ . Since $X_i$ follows a uniform distribution, $X_i = \frac{a+b}{2}$ is simply the average of the min and max at time slot $i$ given pattern $z$ .
The tool recommends selling now if the current price is greater than or equal to the expected maximum price of holding the item and selling later.