What is the expected change of the purchasing game?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
1
down vote

favorite
2












Denote the price of item as $N$ cents. The player has infinite coin supply of $1$, $5$, $10$ or $25$ cents. The player keeps drawing one coin of these four types with equal probability, until accumulated value reaches $N$ or beyond.



Question 1: What is the expected change the player could have for $N = 30$?



For example, if the player keeps drawing until he/she has $29$ cents. He/she draws another $5$ cent. Then he/she keeps the change of $4$ cents.
(My thought: for small $N$, such as $N = 30$, we might use Markov chain and solve all adsorbing state probabilities by hand. However, this is unpleasant.)



Question 2: What if the $N$ goes really large?







share|cite|improve this question



















  • There is a useful recursion...If $p_n$ is the probability that your total equals $n$ at some point then $p_n=.25times (p_n-25+p_n-10+p_n-5+p_n-1)$ where $p_i=0$ for $i<0$, $p_0=1$. Working with that should resolve your questions.
    – lulu
    Jul 14 at 20:23














up vote
1
down vote

favorite
2












Denote the price of item as $N$ cents. The player has infinite coin supply of $1$, $5$, $10$ or $25$ cents. The player keeps drawing one coin of these four types with equal probability, until accumulated value reaches $N$ or beyond.



Question 1: What is the expected change the player could have for $N = 30$?



For example, if the player keeps drawing until he/she has $29$ cents. He/she draws another $5$ cent. Then he/she keeps the change of $4$ cents.
(My thought: for small $N$, such as $N = 30$, we might use Markov chain and solve all adsorbing state probabilities by hand. However, this is unpleasant.)



Question 2: What if the $N$ goes really large?







share|cite|improve this question



















  • There is a useful recursion...If $p_n$ is the probability that your total equals $n$ at some point then $p_n=.25times (p_n-25+p_n-10+p_n-5+p_n-1)$ where $p_i=0$ for $i<0$, $p_0=1$. Working with that should resolve your questions.
    – lulu
    Jul 14 at 20:23












up vote
1
down vote

favorite
2









up vote
1
down vote

favorite
2






2





Denote the price of item as $N$ cents. The player has infinite coin supply of $1$, $5$, $10$ or $25$ cents. The player keeps drawing one coin of these four types with equal probability, until accumulated value reaches $N$ or beyond.



Question 1: What is the expected change the player could have for $N = 30$?



For example, if the player keeps drawing until he/she has $29$ cents. He/she draws another $5$ cent. Then he/she keeps the change of $4$ cents.
(My thought: for small $N$, such as $N = 30$, we might use Markov chain and solve all adsorbing state probabilities by hand. However, this is unpleasant.)



Question 2: What if the $N$ goes really large?







share|cite|improve this question











Denote the price of item as $N$ cents. The player has infinite coin supply of $1$, $5$, $10$ or $25$ cents. The player keeps drawing one coin of these four types with equal probability, until accumulated value reaches $N$ or beyond.



Question 1: What is the expected change the player could have for $N = 30$?



For example, if the player keeps drawing until he/she has $29$ cents. He/she draws another $5$ cent. Then he/she keeps the change of $4$ cents.
(My thought: for small $N$, such as $N = 30$, we might use Markov chain and solve all adsorbing state probabilities by hand. However, this is unpleasant.)



Question 2: What if the $N$ goes really large?









share|cite|improve this question










share|cite|improve this question




share|cite|improve this question









asked Jul 14 at 20:13









Yi Bao

359




359











  • There is a useful recursion...If $p_n$ is the probability that your total equals $n$ at some point then $p_n=.25times (p_n-25+p_n-10+p_n-5+p_n-1)$ where $p_i=0$ for $i<0$, $p_0=1$. Working with that should resolve your questions.
    – lulu
    Jul 14 at 20:23
















  • There is a useful recursion...If $p_n$ is the probability that your total equals $n$ at some point then $p_n=.25times (p_n-25+p_n-10+p_n-5+p_n-1)$ where $p_i=0$ for $i<0$, $p_0=1$. Working with that should resolve your questions.
    – lulu
    Jul 14 at 20:23















There is a useful recursion...If $p_n$ is the probability that your total equals $n$ at some point then $p_n=.25times (p_n-25+p_n-10+p_n-5+p_n-1)$ where $p_i=0$ for $i<0$, $p_0=1$. Working with that should resolve your questions.
– lulu
Jul 14 at 20:23




There is a useful recursion...If $p_n$ is the probability that your total equals $n$ at some point then $p_n=.25times (p_n-25+p_n-10+p_n-5+p_n-1)$ where $p_i=0$ for $i<0$, $p_0=1$. Working with that should resolve your questions.
– lulu
Jul 14 at 20:23










1 Answer
1






active

oldest

votes

















up vote
1
down vote



accepted










I'll answer Question $2$ on the limit of the expected change as $Ntoinfty$.



In a quasisteady state, the process is expected to progress by the average coin value $frac1+5+10+254=frac414$ in each step. It follows that each sum has probability $frac441$ of being attained at some point. Also, since all coins are equiprobable, a sum that is attained at some point is equally likely to be attained by any of the coins.



This, together with linearity of expectation, allows you to sum up the expected change contributions from the sums exceeding $N$. If an attainable final value $Nle vle N+24$ can be reached with $k$ different coins before the game ends, it contributes $frac k4cdotfrac441(v-N)=frac k41(v-N)$ to the change.



The sum $N$ can be reached with any coin value, but it contributes $0$ change.



The $4$ sums $N+1$ through $N+4$ can be reached with the three coin values $5$, $10$ and $25$, so they contribute $frac341sum_k=1^4k=frac3041$.



The $5$ sums $N+5$ through $N+9$ can be reached with the two coin values $10$ and $25$, so they contribute $frac241sum_k=5^9k=frac7041$.



The $15$ sums $N+10$ through $N+24$ can be reached with the one coin value $25$, so they contribute $frac141sum_k=10^24k=frac25541$.



So the total expected change in the limit $Ntoinfty$ is $frac30+70+25541=frac35541approx8.66$.



I really do have to share my favourite change joke with you at this point:



A Zen monk orders chips (or, in US-American: fries). The vendor asks: “With ketchup or mayonnaise?” The Zen monk replies: “Make me one with everything.” Afterwards, the Zen monk pays and says: “Where's my change?” The vendor replies: “Change comes from within.”






share|cite|improve this answer























  • Simulation says you are correct. Let me read it through.
    – Yi Bao
    Jul 14 at 20:44










  • Brilliant! What is your intuition at the beginning?
    – Yi Bao
    Jul 14 at 20:57






  • 1




    @YiBao: How do you mean? The intuition underlying the beginning of the post, or what my intuition was at the beginning of thinking about the problem?
    – joriki
    Jul 14 at 21:02










  • I would say the intuition underlying the beginning of the post.
    – Yi Bao
    Jul 14 at 21:04







  • 1




    Thank you very much for all these helpful comments, joriki!
    – Yi Bao
    Jul 14 at 21:59










Your Answer




StackExchange.ifUsing("editor", function ()
return StackExchange.using("mathjaxEditing", function ()
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix)
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
);
);
, "mathjax-editing");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "69"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);








 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2851917%2fwhat-is-the-expected-change-of-the-purchasing-game%23new-answer', 'question_page');

);

Post as a guest






























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
1
down vote



accepted










I'll answer Question $2$ on the limit of the expected change as $Ntoinfty$.



In a quasisteady state, the process is expected to progress by the average coin value $frac1+5+10+254=frac414$ in each step. It follows that each sum has probability $frac441$ of being attained at some point. Also, since all coins are equiprobable, a sum that is attained at some point is equally likely to be attained by any of the coins.



This, together with linearity of expectation, allows you to sum up the expected change contributions from the sums exceeding $N$. If an attainable final value $Nle vle N+24$ can be reached with $k$ different coins before the game ends, it contributes $frac k4cdotfrac441(v-N)=frac k41(v-N)$ to the change.



The sum $N$ can be reached with any coin value, but it contributes $0$ change.



The $4$ sums $N+1$ through $N+4$ can be reached with the three coin values $5$, $10$ and $25$, so they contribute $frac341sum_k=1^4k=frac3041$.



The $5$ sums $N+5$ through $N+9$ can be reached with the two coin values $10$ and $25$, so they contribute $frac241sum_k=5^9k=frac7041$.



The $15$ sums $N+10$ through $N+24$ can be reached with the one coin value $25$, so they contribute $frac141sum_k=10^24k=frac25541$.



So the total expected change in the limit $Ntoinfty$ is $frac30+70+25541=frac35541approx8.66$.



I really do have to share my favourite change joke with you at this point:



A Zen monk orders chips (or, in US-American: fries). The vendor asks: “With ketchup or mayonnaise?” The Zen monk replies: “Make me one with everything.” Afterwards, the Zen monk pays and says: “Where's my change?” The vendor replies: “Change comes from within.”






share|cite|improve this answer























  • Simulation says you are correct. Let me read it through.
    – Yi Bao
    Jul 14 at 20:44










  • Brilliant! What is your intuition at the beginning?
    – Yi Bao
    Jul 14 at 20:57






  • 1




    @YiBao: How do you mean? The intuition underlying the beginning of the post, or what my intuition was at the beginning of thinking about the problem?
    – joriki
    Jul 14 at 21:02










  • I would say the intuition underlying the beginning of the post.
    – Yi Bao
    Jul 14 at 21:04







  • 1




    Thank you very much for all these helpful comments, joriki!
    – Yi Bao
    Jul 14 at 21:59














up vote
1
down vote



accepted










I'll answer Question $2$ on the limit of the expected change as $Ntoinfty$.



In a quasisteady state, the process is expected to progress by the average coin value $frac1+5+10+254=frac414$ in each step. It follows that each sum has probability $frac441$ of being attained at some point. Also, since all coins are equiprobable, a sum that is attained at some point is equally likely to be attained by any of the coins.



This, together with linearity of expectation, allows you to sum up the expected change contributions from the sums exceeding $N$. If an attainable final value $Nle vle N+24$ can be reached with $k$ different coins before the game ends, it contributes $frac k4cdotfrac441(v-N)=frac k41(v-N)$ to the change.



The sum $N$ can be reached with any coin value, but it contributes $0$ change.



The $4$ sums $N+1$ through $N+4$ can be reached with the three coin values $5$, $10$ and $25$, so they contribute $frac341sum_k=1^4k=frac3041$.



The $5$ sums $N+5$ through $N+9$ can be reached with the two coin values $10$ and $25$, so they contribute $frac241sum_k=5^9k=frac7041$.



The $15$ sums $N+10$ through $N+24$ can be reached with the one coin value $25$, so they contribute $frac141sum_k=10^24k=frac25541$.



So the total expected change in the limit $Ntoinfty$ is $frac30+70+25541=frac35541approx8.66$.



I really do have to share my favourite change joke with you at this point:



A Zen monk orders chips (or, in US-American: fries). The vendor asks: “With ketchup or mayonnaise?” The Zen monk replies: “Make me one with everything.” Afterwards, the Zen monk pays and says: “Where's my change?” The vendor replies: “Change comes from within.”






share|cite|improve this answer























  • Simulation says you are correct. Let me read it through.
    – Yi Bao
    Jul 14 at 20:44










  • Brilliant! What is your intuition at the beginning?
    – Yi Bao
    Jul 14 at 20:57






  • 1




    @YiBao: How do you mean? The intuition underlying the beginning of the post, or what my intuition was at the beginning of thinking about the problem?
    – joriki
    Jul 14 at 21:02










  • I would say the intuition underlying the beginning of the post.
    – Yi Bao
    Jul 14 at 21:04







  • 1




    Thank you very much for all these helpful comments, joriki!
    – Yi Bao
    Jul 14 at 21:59












up vote
1
down vote



accepted







up vote
1
down vote



accepted






I'll answer Question $2$ on the limit of the expected change as $Ntoinfty$.



In a quasisteady state, the process is expected to progress by the average coin value $frac1+5+10+254=frac414$ in each step. It follows that each sum has probability $frac441$ of being attained at some point. Also, since all coins are equiprobable, a sum that is attained at some point is equally likely to be attained by any of the coins.



This, together with linearity of expectation, allows you to sum up the expected change contributions from the sums exceeding $N$. If an attainable final value $Nle vle N+24$ can be reached with $k$ different coins before the game ends, it contributes $frac k4cdotfrac441(v-N)=frac k41(v-N)$ to the change.



The sum $N$ can be reached with any coin value, but it contributes $0$ change.



The $4$ sums $N+1$ through $N+4$ can be reached with the three coin values $5$, $10$ and $25$, so they contribute $frac341sum_k=1^4k=frac3041$.



The $5$ sums $N+5$ through $N+9$ can be reached with the two coin values $10$ and $25$, so they contribute $frac241sum_k=5^9k=frac7041$.



The $15$ sums $N+10$ through $N+24$ can be reached with the one coin value $25$, so they contribute $frac141sum_k=10^24k=frac25541$.



So the total expected change in the limit $Ntoinfty$ is $frac30+70+25541=frac35541approx8.66$.



I really do have to share my favourite change joke with you at this point:



A Zen monk orders chips (or, in US-American: fries). The vendor asks: “With ketchup or mayonnaise?” The Zen monk replies: “Make me one with everything.” Afterwards, the Zen monk pays and says: “Where's my change?” The vendor replies: “Change comes from within.”






share|cite|improve this answer















I'll answer Question $2$ on the limit of the expected change as $Ntoinfty$.



In a quasisteady state, the process is expected to progress by the average coin value $frac1+5+10+254=frac414$ in each step. It follows that each sum has probability $frac441$ of being attained at some point. Also, since all coins are equiprobable, a sum that is attained at some point is equally likely to be attained by any of the coins.



This, together with linearity of expectation, allows you to sum up the expected change contributions from the sums exceeding $N$. If an attainable final value $Nle vle N+24$ can be reached with $k$ different coins before the game ends, it contributes $frac k4cdotfrac441(v-N)=frac k41(v-N)$ to the change.



The sum $N$ can be reached with any coin value, but it contributes $0$ change.



The $4$ sums $N+1$ through $N+4$ can be reached with the three coin values $5$, $10$ and $25$, so they contribute $frac341sum_k=1^4k=frac3041$.



The $5$ sums $N+5$ through $N+9$ can be reached with the two coin values $10$ and $25$, so they contribute $frac241sum_k=5^9k=frac7041$.



The $15$ sums $N+10$ through $N+24$ can be reached with the one coin value $25$, so they contribute $frac141sum_k=10^24k=frac25541$.



So the total expected change in the limit $Ntoinfty$ is $frac30+70+25541=frac35541approx8.66$.



I really do have to share my favourite change joke with you at this point:



A Zen monk orders chips (or, in US-American: fries). The vendor asks: “With ketchup or mayonnaise?” The Zen monk replies: “Make me one with everything.” Afterwards, the Zen monk pays and says: “Where's my change?” The vendor replies: “Change comes from within.”







share|cite|improve this answer















share|cite|improve this answer



share|cite|improve this answer








edited Jul 14 at 20:48


























answered Jul 14 at 20:43









joriki

165k10180328




165k10180328











  • Simulation says you are correct. Let me read it through.
    – Yi Bao
    Jul 14 at 20:44










  • Brilliant! What is your intuition at the beginning?
    – Yi Bao
    Jul 14 at 20:57






  • 1




    @YiBao: How do you mean? The intuition underlying the beginning of the post, or what my intuition was at the beginning of thinking about the problem?
    – joriki
    Jul 14 at 21:02










  • I would say the intuition underlying the beginning of the post.
    – Yi Bao
    Jul 14 at 21:04







  • 1




    Thank you very much for all these helpful comments, joriki!
    – Yi Bao
    Jul 14 at 21:59
















  • Simulation says you are correct. Let me read it through.
    – Yi Bao
    Jul 14 at 20:44










  • Brilliant! What is your intuition at the beginning?
    – Yi Bao
    Jul 14 at 20:57






  • 1




    @YiBao: How do you mean? The intuition underlying the beginning of the post, or what my intuition was at the beginning of thinking about the problem?
    – joriki
    Jul 14 at 21:02










  • I would say the intuition underlying the beginning of the post.
    – Yi Bao
    Jul 14 at 21:04







  • 1




    Thank you very much for all these helpful comments, joriki!
    – Yi Bao
    Jul 14 at 21:59















Simulation says you are correct. Let me read it through.
– Yi Bao
Jul 14 at 20:44




Simulation says you are correct. Let me read it through.
– Yi Bao
Jul 14 at 20:44












Brilliant! What is your intuition at the beginning?
– Yi Bao
Jul 14 at 20:57




Brilliant! What is your intuition at the beginning?
– Yi Bao
Jul 14 at 20:57




1




1




@YiBao: How do you mean? The intuition underlying the beginning of the post, or what my intuition was at the beginning of thinking about the problem?
– joriki
Jul 14 at 21:02




@YiBao: How do you mean? The intuition underlying the beginning of the post, or what my intuition was at the beginning of thinking about the problem?
– joriki
Jul 14 at 21:02












I would say the intuition underlying the beginning of the post.
– Yi Bao
Jul 14 at 21:04





I would say the intuition underlying the beginning of the post.
– Yi Bao
Jul 14 at 21:04





1




1




Thank you very much for all these helpful comments, joriki!
– Yi Bao
Jul 14 at 21:59




Thank you very much for all these helpful comments, joriki!
– Yi Bao
Jul 14 at 21:59












 

draft saved


draft discarded


























 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2851917%2fwhat-is-the-expected-change-of-the-purchasing-game%23new-answer', 'question_page');

);

Post as a guest













































































Comments

Popular posts from this blog

What is the equation of a 3D cone with generalised tilt?

Color the edges and diagonals of a regular polygon

Relationship between determinant of matrix and determinant of adjoint?