What is the probability of getting the first red marble at the fifth try? [closed] - math

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 2 years ago.
Improve this question
The problem sounds like this:
There are 8 white marbles and 10 red marbles in a bowl. Each action consists of taking one marble from the bowl and putting it back into the bowl. The question is: What is the probability that at the FIFTH time you are taking a marble out of the bowl, this would be the FIRST red marble that you took?
I tried to simplify a bit this problem and thinking only of the SECOND time. Therefore, I think the answer would be 8/18*10/18. (The probability of having the first one white and the second one red.) Could be this extended to the FIFTH case as well? (8/18)^4*10/18? I am not sure if I am missing something or not.
Thank you in advance!

This is a geometric aleatory variable (let's call it X) because you have a succession of N independent Bernoulli aleatory variables, with probability of success 10/18, so you have:
P(X=5) = (1-10/18)^4 * (10/18)
Because if you have a geometric aleatory variable Y with probability of success p then:
P(Y=k) = [(1-p)^(k-1)]*p

Related

How do I analyze movement between points in R? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 8 years ago.
Improve this question
So I have a lot of points, kind of like this:
animalid1;A;time
animalid1;B;time
animalid1;C;time
animalid2;A;time
animalid2;B;time
animalid2;A;time
animalid2;B;time
animalid2;C;time
animalid3;A;time
animalid3;B;time
animalid3;C;time
animalid3;B;time
animalid3;A;time
What I want to do is to first of all make R understand that the points A,B,C are connected. Then I want to get comparisons of movement from A to C and how long time it takes, how many steps were used, etc. So maybe I have a movement sequence like ABC on 20 animals and then ABABC on 10 animals and then ABCBA on 5 animals. I want to get some sort of statistical test done to see if the total time is different between these groups, and so on.
I bet this has been done before. But my Google skills are not good enough to find it.
Look at the msm package (msm stands for Multi State Model). Given observations of states at different times it will estimate probabilities of transitions and average time in the different states.

Mathematical induction proofs [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 9 years ago.
Improve this question
For my theory of computation class, we are supposed to do some review/practice problems to work off the rust and make sure we are ready for the course. Some of the problems are induction proofs. I did this at one time, but apparently it has completely escaped me. I've watched a couple tutorials, but still can't do problem 'a'. If anyone can walk me through the first problem I'm pretty sure I could figure out the second one on my own. Any help would be appreciated!
First verify it holds for n = 1.
Then assume it is true for n = x ( the sum of the first x squares ) and then try to compute the sum of the the first x + 1 squares. You know the result for the first x, you just add the last square to that sum. From there it should be easy.
And you posted on the wrong site.

Would this be considered a fractal? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I was wondering if this would be considered a fractal or just a recursive shape. It seems like it is to me, but our lab says "However, it is not just enough that the shape was generated by some recursive process, because there are shapes you could generate recursively which are not fractals," but it also explains more. To me, it seems like it is, but I just wanted to make sure.
Thank you very much!
No, it is not a fractal, because it doesn't demonstrate self-similarity. See: http://mathworld.wolfram.com/Fractal.html
A fractal has recursive properties, but not all recursive figures are fractals.
Here's what my rule of thumb is to decide whether a shape is a fractal or not:
Zoom into the object by a factor of X (say).
Count how many copies of the original object are in the zoomed-in version, let's call it N.
The dimension of the object is the logarithm of N, to the base X.
Eg: Zoom into a square by a factor of 2, you'll have 4 copies of the square that "fit inside" the larger square. Since log 4 (base 2) is 2, hence this is a 2D object.
Look at the Koch curve:
Zooming in 3x will give you 4 copies of the original curve, hence its "dimension" is log 4 (base 3), which is a number between 1 and 2... a fractional dimension, (hence the name fractal).
Applying this rule to your recursive figure, if you zoom in 2x, you will still see the original figure (N = 1). Its dimension works out to be log 1 (base 2), which is zero.
Since zero is not a fraction, therefore your figure is not a fractal.

Divide 9×3 rect into 8 equal size square [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
You whip up your favorite brownie recipe and pour into your new 9×3 inch baking dish. The brownies bake. The toothpick comes out clean. Now for the cutting.
A square is the most delicious shape for a brownie. You have eight people to serve. How can you cut your newly baked creation into exactly eight square pieces?
So this is essentially a variation on a bin packing problem (which is well known to be NP-hard!).
One solution is to use 2 3x3 squares, 1 2x2 square and 5 1x1 squares, as follows:
The solution is obviously non-unique, since the positions of the various squares can be permuted around.
Due to the NP-hardness I imagine it would be difficult to come up with an efficient algorithm to divide a general NxM rectangle into k square pieces exactly. In fact there must be whole families of parameter values for which no solution is possible (for instance if you started with an 6x1 rectangle it would be impossible to divide into anything less than 6 squares...).

Uniform Random Selection with Replacement [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 6 years ago.
Improve this question
Suppose you have a deck of 100 cards, with the numbers 1-100 on one side. You select a card, note the number, replace the card, shuffle, and repeat.
Question #1: How many cards (on average) must you select to have drawn the same card twice? Why?
Question #2: How many cards (on average) must you select to have drawn all of the cards at least once? Why?
(thanks, it has to do with random music playlists and making the option to not repeat the shuffle, as it were)
Q1: Relates to Birthday paradox problem
As you see in the collision problem section(in wikipedia link above), your question maps exactly.
Cast as a collision problem
The birthday problem can be generalized as follows: given n random integers drawn from a discrete uniform distribution with range [1,d], what is the probability p(n;d) that at least two numbers are the same? (d=365 gives the usual birthday problem.)
You have a range [1,100] from which you select random cards. The probability of collision(two selected cards are the same) is given as p(n;d) = ...
Further down, we have formula for average/expected number of selections as
Q(100) gives your answer.

Resources