+ Reply to Thread
Results 1 to 10 of 10

Thread: Need help with basic probability scenario (not hw)

  1. #1
    Points: 359, Level: 7
    Level completed: 18%, Points required for next Level: 41

    Posts
    6
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Need help with basic probability scenario (not hw)




    Rephrasing the scenario into a word problem for the sake of simplicity. I hope it doesn't get convoluted, but then again explaining the actual mechanic might not help much either.

    There are five switches laid in a row numbered one through five. Each switch is turned on in the order that they are laid.

    The first switch has a 100% chance to turn on. The second switch has a 50% chance to turn on. The third switch's chance to turn on is based upon the result of the second switch. If the second switch did not turn on, then the third switch now has a 50% chance to turn on. If the second switch did turn on however, the third switch now only has a 25% chance to turn on.

    If neither the second or third switches turn on, then the fourth switch now has a 50% chance to turn on. If the second switch did not turn on, but the third switch did however, the fourth switch now has a 25% chance to turn on. Repeat for switch 5, etc.

    Additionally, only a maximum of three switches (including the first) can turn on. What are each switch's chance of turning on when they are activated individually in numerical order?
    I tried searching but I don't even know what to search for. If someone could help, or at least point me in the right direction I'd appreciate it.
    Last edited by rw90; 05-11-2013 at 04:37 PM.

  2. #2
    Points: 46, Level: 1
    Level completed: 92%, Points required for next Level: 4

    Posts
    11
    Thanks
    2
    Thanked 1 Time in 1 Post

    Re: Need help with basic probability scenario (not hw)

    1 = 100%
    2 = 50%
    3 = 50% x 50% to turn on if 2 does not turn on, 50% x 25% to turn on if 2 does turn on.
    4 = 50% x 50% x 50% to turn on if 2 and 3 do not turn on, 50% x 25% x 25% to turn on if 2 is off and 3 is on.
    5 = 50% x 50% x 50% x 50% to turn on if 2, 3 and 4 do not turn on, 50% x 25% x 25% 25% if 2, 3 and 4 are on.

    See how this works now? Change the equation based on whether a switch is off or on. I'm fairly sure this is right, anyone got a second opinion though?

  3. The Following User Says Thank You to JesseJames For This Useful Post:

    rw90 (05-12-2013)

  4. #3
    Points: 359, Level: 7
    Level completed: 18%, Points required for next Level: 41

    Posts
    6
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Re: Need help with basic probability scenario (not hw)

    Quote Originally Posted by JesseJames View Post
    1 = 100%
    2 = 50%
    3 = 50% x 50% to turn on if 2 does not turn on, 50% x 25% to turn on if 2 does turn on.
    4 = 50% x 50% x 50% to turn on if 2 and 3 do not turn on, 50% x 25% x 25% to turn on if 2 is off and 3 is on.
    5 = 50% x 50% x 50% x 50% to turn on if 2, 3 and 4 do not turn on, 50% x 25% x 25% 25% if 2, 3 and 4 are on.

    See how this works now? Change the equation based on whether a switch is off or on. I'm fairly sure this is right, anyone got a second opinion though?
    Thanks for the reply. I see how it works to an extent, but could you then represent each switch with a single probability that accounts for the previous switches?

  5. #4
    Devorador de queso
    Points: 95,983, Level: 100
    Level completed: 0%, Points required for next Level: 0
    Awards:
    Posting AwardCommunity AwardDiscussion EnderFrequent Poster
    Dason's Avatar
    Location
    Tampa, FL
    Posts
    12,938
    Thanks
    307
    Thanked 2,630 Times in 2,246 Posts

    Re: Need help with basic probability scenario (not hw)

    What do you mean by a single probability? The events aren't all independent. Toss in the fact that out of switches 2-4 a maximum of two of them actually can turn on a light and things aren't too nice. There are really only 11 possible outcomes you need to consider though - let Y indicate that the light is on and N be that the light is off.

    YNNNN (First light is on - the rest are off)
    YYNNN (First and second lights are one - the rest are off)
    YNYNN (so on...)
    YNNYN
    YNNNY
    YYYNN
    YYNYN
    YYNNY
    YNYYN
    YNYNY
    YNNYY

    From your information you can figure out the probability of each of these occuring. Note that since these are the only 11 possibilities (based on the fact that light 1 always turns on and there can only be a maximum of 3 lights that are on) that the probabilities that each of these occur should sum to 1. If they don't then the information provided isn't truly correct.
    I don't have emotions and sometimes that makes me very sad.

  6. The Following User Says Thank You to Dason For This Useful Post:

    rw90 (05-12-2013)

  7. #5
    Points: 359, Level: 7
    Level completed: 18%, Points required for next Level: 41

    Posts
    6
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Re: Need help with basic probability scenario (not hw)

    Quote Originally Posted by Dason View Post
    What do you mean by a single probability? The events aren't all independent. Toss in the fact that out of switches 2-4 a maximum of two of them actually can turn on a light and things aren't too nice. There are really only 11 possible outcomes you need to consider though - let Y indicate that the light is on and N be that the light is off.

    YNNNN (First light is on - the rest are off)
    YYNNN (First and second lights are one - the rest are off)
    YNYNN (so on...)
    YNNYN
    YNNNY
    YYYNN
    YYNYN
    YYNNY
    YNYYN
    YNYNY
    YNNYY

    From your information you can figure out the probability of each of these occuring. Note that since these are the only 11 possibilities (based on the fact that light 1 always turns on and there can only be a maximum of 3 lights that are on) that the probabilities that each of these occur should sum to 1. If they don't then the information provided isn't truly correct.
    Sorry, it's been a while since I did probability in HS, so I'm probably not using proper terminology. What I mean is, if you were to perform some number of experiments and record how often each light turns on, you'd come up with an average percent chance that each light would turn on based on the results, right? How would you calculate that number mathematically? Heres what I originally tried before I made this topic:

    Switch 1: 100%
    Switch 2: 50%
    Switch 3: (50+25)/2=37.5%..?
    Switch 4: (37.5+25)/2=31.25%..?

    Trying to find the single percent chance each switch has to activate on average. I know with certainty switch 1 is always 100%, and switch 2 is always 50%, the other 3 is where I'm stuck. Not sure if average is the correct word.

  8. #6
    Devorador de queso
    Points: 95,983, Level: 100
    Level completed: 0%, Points required for next Level: 0
    Awards:
    Posting AwardCommunity AwardDiscussion EnderFrequent Poster
    Dason's Avatar
    Location
    Tampa, FL
    Posts
    12,938
    Thanks
    307
    Thanked 2,630 Times in 2,246 Posts

    Re: Need help with basic probability scenario (not hw)

    That's what I was trying to explain. There are only 11 possible outcomes based on the criteria you gave. If I give you a sequence you should be able to figure out the probability of that sequence occurring right?

    So if we do that for each of the 11 sequences all of those probabilities should sum to 1. Then if you want to find the probability that the third switch is on you just sum the probabilities for each of the sequences where the third switch is on.

    If you've ever used R here is some code that does all of that for you.

    Code: 
    # All outcomes with no restrictions
    x <- c(T, F)
    o <- expand.grid(x, x, x, x, x)
    # Only care about ones that have TRUE as first
    o <- o[o[,1], ]
    # Only care about ones that have <=3 lights on
    o <- o[apply(o, 1, sum) <= 3,]
    
    # Probabilities for each outcome
    ps <- c(
    1 * .5 *  .5 *  .5 * .25,
    1 * .5 *  .5 * .75 * .25,
    1 * .5 * .75 * .75 * .25,
    1 * .5 *  .5 *  .5 *  .5,
    1 * .5 *  .5 * .25 *   1,
    1 * .5 * .75 * .25 *   1,
    1 * .5 *  .5 *  .5 * .75,
    1 * .5 * .25 *   1 *   1,
    1 * .5 *  .5 * .75 * .75,
    1 * .5 * .75 * .75 * .75,
    1 * .5 *  .5 *  .5 *  .5)
    
    # Should sum to 1
    sum(ps)
    
    # Find marginal probability for each position
    apply(o, 2, function(x){sum(ps[x])})
    I don't have emotions and sometimes that makes me very sad.

  9. The Following User Says Thank You to Dason For This Useful Post:

    rw90 (05-12-2013)

  10. #7
    Points: 359, Level: 7
    Level completed: 18%, Points required for next Level: 41

    Posts
    6
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Re: Need help with basic probability scenario (not hw)

    Never used R before, but I downloaded, installed, and ran the script you made for me, and it returned:

    Code: 
         Var1      Var2      Var3      Var4      Var5 
    1.0000000 0.5000000 0.3750000 0.2812500 0.2109375
    Those are the percent chances that each switch ultimately has to turn on? To be honest, even as much as you had helped me along, I probably would not have figured that out on my own from where you had left it without the script. For the sake of comprehension, where did the .75's come from? Thanks a lot for the help.
    Last edited by rw90; 05-12-2013 at 02:33 PM.

  11. #8
    Devorador de queso
    Points: 95,983, Level: 100
    Level completed: 0%, Points required for next Level: 0
    Awards:
    Posting AwardCommunity AwardDiscussion EnderFrequent Poster
    Dason's Avatar
    Location
    Tampa, FL
    Posts
    12,938
    Thanks
    307
    Thanked 2,630 Times in 2,246 Posts

    Re: Need help with basic probability scenario (not hw)

    Well at any given point if the probability a switch will turn the light on is .25 then that means that the probability it won't turn on is .75.
    I don't have emotions and sometimes that makes me very sad.

  12. The Following User Says Thank You to Dason For This Useful Post:

    rw90 (05-12-2013)

  13. #9
    Points: 359, Level: 7
    Level completed: 18%, Points required for next Level: 41

    Posts
    6
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Re: Need help with basic probability scenario (not hw)

    Quote Originally Posted by Dason View Post
    Well at any given point if the probability a switch will turn the light on is .25 then that means that the probability it won't turn on is .75.
    Oh, now it makes a lot more sense. Thanks alot for the help.

  14. #10
    Points: 359, Level: 7
    Level completed: 18%, Points required for next Level: 41

    Posts
    6
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Re: Need help with basic probability scenario (not hw)


    Quick bump, I just wanted to check if I was doing this right:

    http://imgur.com/32Gygdf

    I changed the values in the scenario to 100% on first activation, 60% for next, 35% for next, etc, then added the respective probabilities to get the ultimate probability each switch had to activate. Is this correct?

+ Reply to Thread

           




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts






Advertise on Talk Stats