Day 2: Basic Probability Puzzles #4

Sort 3 Discussions, By:

Sorry, you do not have a permission to answer to this question.

  • Shekomaru 9 years ago + 1 comment

    Could someone post the subject of study for this problem, so we can do some research to solve this problem? I have some ideas, but I'm a little lost in this one. My objective is to learn what I need no know, learn it, and then, apply it in this problem, and in many more.

    Add Reply Preview cancel

    Sorry, you do not have a permission to answer to this question.

    • [deleted] 9 years ago + 1 comment

      This is basic probability -- a good reference is the section on the book by Lehman, Leighton & Meyer, Mathematics for Computer Science. (Available for free)

      Add Reply Preview cancel

      Sorry, you do not have a permission to answer to this question.

      • Shekomaru 9 years ago + 1 comment

        I'm reading the book, and looks very useful

        Thanks! :)

        Add Reply Preview cancel

        Sorry, you do not have a permission to answer to this question.

        • diegoluiz 9 years ago + 0 comments

          Well, it's very very basic, but a base for this challenge. http://www.shmoop.com/basic-statistics-probability/probability-examples.html

          Add Reply Preview cancel

          Sorry, you do not have a permission to answer to this question.

    • veganpunk 9 years ago + 1 comment

      There must be something wrong with the problem since it is not stated if one has to draw with or without replacement, which makes a difference obviously.

      Add Reply Preview cancel

      Sorry, you do not have a permission to answer to this question.

      • jerus77 Asked to answer 9 years ago + 0 comments

        Acutally I think you are right that it could be stated more precisely. In this case it's without replacement. But you could always try both solutions and see which one passes the test ;)

        Add Reply Preview cancel

        Sorry, you do not have a permission to answer to this question.

      • Vinprogress 9 years ago + 1 comment

        Can anybody give formula for this?

        Add Reply Preview cancel

        Sorry, you do not have a permission to answer to this question.

        • Mayank7533 Asked to answer 9 years ago + 1 comment

          There are 2 cases-

          1>draw a red ball from b1 and 2 black balls from b2

          2>braw a black ball from b1 and a red and black ball from b2 you just need to calculate individual probability of both cases and add them.

          Add Reply Preview cancel

          Sorry, you do not have a permission to answer to this question.

          • Vinprogress 9 years ago + 2 comments

            It will come like this 4/9 * 7/10 * 6/9 + 5/9 * 3/10 * 7/9 ?

            Add Reply Preview cancel

            Sorry, you do not have a permission to answer to this question.

            • mschle 9 years ago + 0 comments

              similar you forgot that the second option (draw a black ball from b1 and both colors from b2) is basically two different cases as well, the red ball might be the first or the second one...

              Add Reply Preview cancel

              Sorry, you do not have a permission to answer to this question.

              • shashi_k 9 years ago + 0 comments

                it's (bag1 bag2) => (B BR)(R BB)

                Add Reply Preview cancel

                Sorry, you do not have a permission to answer to this question.

          1. Challenge Walkthrough
            Let's walk through this sample challenge and explore the features of the code editor.1 of 6
          2. Review the problem statement
            Each challenge has a problem statement that includes sample inputs and outputs. Some challenges include additional information to help you out.2 of 6
          3. Choose a language
            Select the language you wish to use to solve this challenge.3 of 6
          4. Enter your code
            Code your solution in our custom editor or code in your own environment and upload your solution as a file.4 of 6
          5. Test your code
            You can compile your code and test it for errors and accuracy before submitting.5 of 6
          6. Submit to see results
            When you're ready, submit your solution! Remember, you can go back and refine your code anytime.6 of 6
          1. Check your score