How to find the average number of iterations for a variable to reach a number. Suppose I have an infinite loop with a variable x that starts at 0. Every iteration of the loop, x has a 10% chance of being increased by 1 and a 90% chance of being decreased by 1, but it cannot go below 0. How can I calculate the average number of iterations of the loop for x to reach a certain number?

Tyson Atkins 2022-10-15 Answered
How to find the average number of iterations for a variable to reach a number.
Suppose I have an infinite loop with a variable x that starts at 0. Every iteration of the loop, x has a 10% chance of being increased by 1 and a 90% chance of being decreased by 1, but it cannot go below 0. How can I calculate the average number of iterations of the loop for x to reach a certain number?
You can still ask an expert for help

Want to know more about Probability?

Expert Community at Your Service

  • Live experts 24/7
  • Questions are typically answered in as fast as 30 minutes
  • Personalized clear answers
Learn more

Solve your problem for the price of one coffee

  • Available 24/7
  • Math expert for every subject
  • Pay only if we can solve it
Ask Question

Answers (1)

broeifl
Answered 2022-10-16 Author has 11 answers
Step 1
As per MSE protocol, I can't give a full answer, but just to start you off, suppose you want to know the expected # of steps to get to 4 on the natural number line from 0,
we can start by writing S 0 = 1 + 0.1 S 1 + 0.9 S 0
Step 2
This equation means that with one step from 0, we either move with P r = 0.1 to step 1 or fall back to step 0 (since we can't go below 0) with P r = 0.9, and we can frame similar equations step by step, so the four equations will be
S 0 = 1 + 0.1 S 1 + 0.9 S 0
S 1 = 1 + 0.1 S 2 + 0.9 S 0
S 2 = 1 + 0.1 S 3 + 0.9 S 1
S 3 = 1 + 0.9 S 2
Did you like this example?
Subscribe for all access

Expert Community at Your Service

  • Live experts 24/7
  • Questions are typically answered in as fast as 30 minutes
  • Personalized clear answers
Learn more

You might be interested in

asked 2021-08-19
Let X represent the difference between the number of heads and the number of tails obtained when a coin is tossed n times.
What are the possible values of X?
asked 2021-08-20
Let X be a normal random variable with mean 12 and variance 4. Find the value of c such that P{X>c}=.10.
asked 2021-08-19
Based on the Normal model N(100, 16) describing IQ scores, what percent of peoples
asked 2022-02-14
What general form of the mass function of a conditional probability distribution for discrete random variables?
asked 2021-12-08
During contract negotiations, a company seeks to change the number of sick days employees may take, saying that the annual “average” is 7 days of absence per employee. The union negotiators counter that the “average” employee misses only 3 days of work each year. Explain how both sides might be correct, identifying the measure of center you think each side is using and why the difference might exist.
asked 2022-08-16
In a​ state's Pick 3 lottery​ game, you pay ​$1.23 to select a sequence of three digits​ (from 0 to​ 9), such as 266. If you select the same sequence of three digits that are​ drawn, you win and collect ​$382.15 Complete parts​ (a) through​ (e).
a. How many different selections are​ possible?
b. What is the probability of​ winning?
(Type an integer or a​ decimal.)
c. If you​ win, what is your net​ profit?
​(Type an integer or a​ decimal.)
d. Find the expected value.
​$(Round to the nearest hundredth as​ needed.)
e. If you bet $ 1.23 in a certain​ state's Pick 4​ game, the expected value is negative $ 0.85−. Which bet is​ better, a​$1.23bet in the Pick 3 game or a $ 1.23 bet in the Pick 4​ game? Explain.
A.
The Pick 3 game is a better bet because it has a larger expected value.
B.
Neither bet is better because both games have the same expected value.
C.
The Pick 4 game is a better bet because it has a larger expected value.
asked 2022-07-05

It is known that, on average, a predatory fish catches 1 prey in 10 minutes. Find the
probability that the fish will catch 8 preys in an hour.

New questions

i'm seeking out thoughts for a 15-hour mathematical enrichment course in a chinese language high faculty. What (pretty) simple concern would you advocate as a subject for any such course?
historical past/issues:
My students are generally pretty good at math, but many of them have no longer been uncovered to rigorous or summary mathematical reasoning. an amazing topic would be one that could not be impossibly hard for students who have by no means written or study proofs in English.
i have taught this magnificence three times earlier than. (a part of the purpose that i'm posting that is that i have used up all my thoughts!) the primary semester I taught an introductory range theory elegance (which meandered its way toward a proof of quadratic reciprocity, though I think this become in the end too advanced/abstract for some of the students). the second one semester I taught fundamental graph idea and packages (with a focal point on planarity and coloring). The 1/3 semester I taught a class at the Rubik's dice.
the students' math backgrounds are pretty numerous: a number of them take part in contest math competitions, and so are familiar with IMO-fashion techniques, however many aren't. a number of them may additionally realize some calculus, however I cannot assume it. all of them are superb at what in the united states is on occasion termed "pre-calculus": trigonometry, conic sections, systems of linear equations (though, shockingly, no matrices), and the like. They realize what a binomial coefficient is.
So, any ideas? preferably, i'd like to find some thing a bit "sexy" (like the Rubik's cube) -- tries to encourage wide variety theory through cryptography seemed to fall on deaf ears, however being capable of "see" institution idea on the cube became pretty popular.
(Responses specifically welcome from folks who grew up in the percent -- any mathematical subjects you desire were protected within the excessive college curriculum?)