Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. help with homework

help with homework

Scheduled Pinned Locked Moved The Lounge
helpquestionlounge
24 Posts 14 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Daniel Wilson

    You're right. I didn't go through and calculate .444 but the equation above it is correct. Out of curiosity how might you calculate this without using Bayes theorem? Saying "use Bayes theorem" is kinda redundant... or at least it is to me as I can't think of another way to approach it.

    D Offline
    D Offline
    Daniel Turini
    wrote on last edited by
    #12

    Daniel Wilson wrote: or at least it is to me as I can't think of another way to approach it. There's always the Monte Carlo approach... :-D Perl combines all the worst aspects of C and Lisp: a billion different sublanguages in one monolithic executable. It combines the power of C with the readability of PostScript. -- Jamie Zawinski

    1 Reply Last reply
    0
    • D Daniel Wilson

      You're right. I didn't go through and calculate .444 but the equation above it is correct. Out of curiosity how might you calculate this without using Bayes theorem? Saying "use Bayes theorem" is kinda redundant... or at least it is to me as I can't think of another way to approach it.

      A Offline
      A Offline
      Andy Brummer
      wrote on last edited by
      #13

      There is always brute force. Calculate all posibilities and just count apples and oranges. (or boxes in this case.) My goal is to look at code like a chessmaster looks at a chessboard to see positions and possibilites beyond lines and characters.

      L D D 3 Replies Last reply
      0
      • B Brakanjan

        Hi Could you guys check if my homework is correct: Q A box (A) contains 8 apples and 4 oranges Another box (B) containes 10 apples and 2 oranges A fruit is picked from a random box, and found to be an apple. what is the chance of this apple comming from box A. Use Bayes theorem. scroll down for my answer A: 8/12 * 1/2 ---------------------- 8/12 * 1/2 + 10/12 * 1/2 = 0.444

        T Offline
        T Offline
        tidge
        wrote on last edited by
        #14

        The true answer is that there is no apple.

        1 Reply Last reply
        0
        • B brianwelsch

          42 BW CP Member Homepages


          "Miraculous you call it babe? You ain't seen nothing yet.
          They got Pepsi in the Andes. They got McDonalds in Tibet"

          B Offline
          B Offline
          Brian Delahunty
          wrote on last edited by
          #15

          I just saw this thread now and I was about to answer with that. :-) Regards, Brian Dela :-) http://www.briandela.com IE 6 required.
          http://www.briandela.com/pictures Now with a pictures section :-D
          http://www.briandela.com/rss/newsrss.xml RSS Feed

          B 1 Reply Last reply
          0
          • A Andy Brummer

            There is always brute force. Calculate all posibilities and just count apples and oranges. (or boxes in this case.) My goal is to look at code like a chessmaster looks at a chessboard to see positions and possibilites beyond lines and characters.

            L Offline
            L Offline
            Lost User
            wrote on last edited by
            #16

            andy brummer wrote: My goal is to look at code like a chessmaster looks at a chessboard to see positions and possibilites beyond lines and characters. ...and wait for the computer (and illiterate users...) beat you at the game :) My article on a reference-counted smart pointer that supports polymorphic objects and raw pointers

            1 Reply Last reply
            0
            • B Brakanjan

              Hi Could you guys check if my homework is correct: Q A box (A) contains 8 apples and 4 oranges Another box (B) containes 10 apples and 2 oranges A fruit is picked from a random box, and found to be an apple. what is the chance of this apple comming from box A. Use Bayes theorem. scroll down for my answer A: 8/12 * 1/2 ---------------------- 8/12 * 1/2 + 10/12 * 1/2 = 0.444

              L Offline
              L Offline
              leppie
              wrote on last edited by
              #17

              You cant compare oranges to apples! top secret

              1 Reply Last reply
              0
              • A Andy Brummer

                There is always brute force. Calculate all posibilities and just count apples and oranges. (or boxes in this case.) My goal is to look at code like a chessmaster looks at a chessboard to see positions and possibilites beyond lines and characters.

                D Offline
                D Offline
                Daniel Turini
                wrote on last edited by
                #18

                andy brummer wrote: There is always brute force. Calculate all posibilities and just count apples and oranges. (or boxes in this case.) You can make it sound more impressive calling it "the Monte Carlo statistical modelling" (I'm serious) :) Perl combines all the worst aspects of C and Lisp: a billion different sublanguages in one monolithic executable. It combines the power of C with the readability of PostScript. -- Jamie Zawinski

                D A 2 Replies Last reply
                0
                • A Andy Brummer

                  There is always brute force. Calculate all posibilities and just count apples and oranges. (or boxes in this case.) My goal is to look at code like a chessmaster looks at a chessboard to see positions and possibilites beyond lines and characters.

                  D Offline
                  D Offline
                  Daniel Wilson
                  wrote on last edited by
                  #19

                  In this case they are one in the same since there isn't a bias towards one basket. 8/12 * 1/2 24 ---------------------- * ----- 8/12 * 1/2 + 10/12 * 1/2 24 = 8 --- 18 = .444

                  1 Reply Last reply
                  0
                  • D Daniel Turini

                    andy brummer wrote: There is always brute force. Calculate all posibilities and just count apples and oranges. (or boxes in this case.) You can make it sound more impressive calling it "the Monte Carlo statistical modelling" (I'm serious) :) Perl combines all the worst aspects of C and Lisp: a billion different sublanguages in one monolithic executable. It combines the power of C with the readability of PostScript. -- Jamie Zawinski

                    D Offline
                    D Offline
                    Daniel Wilson
                    wrote on last edited by
                    #20

                    Again I am amazed by the power of marketing. :-D

                    1 Reply Last reply
                    0
                    • B Brakanjan

                      Daniel Wilson wrote: Saying "use Bayes theorem" is kinda redundant just a helpful hint, I suppose. tx:)

                      D Offline
                      D Offline
                      Daniel Wilson
                      wrote on last edited by
                      #21

                      I guess technically we are both wrong since .444 isn't the "right" answer but instead .4444444 with 4 repeating ad infinitum but I can figure out how to put a line above the 4. ;P

                      1 Reply Last reply
                      0
                      • B Brian Delahunty

                        I just saw this thread now and I was about to answer with that. :-) Regards, Brian Dela :-) http://www.briandela.com IE 6 required.
                        http://www.briandela.com/pictures Now with a pictures section :-D
                        http://www.briandela.com/rss/newsrss.xml RSS Feed

                        B Offline
                        B Offline
                        brianwelsch
                        wrote on last edited by
                        #22

                        Great names think alike. BW CP Member Homepages


                        "Miraculous you call it babe? You ain't seen nothing yet.
                        They got Pepsi in the Andes. They got McDonalds in Tibet"

                        1 Reply Last reply
                        0
                        • D Daniel Turini

                          andy brummer wrote: There is always brute force. Calculate all posibilities and just count apples and oranges. (or boxes in this case.) You can make it sound more impressive calling it "the Monte Carlo statistical modelling" (I'm serious) :) Perl combines all the worst aspects of C and Lisp: a billion different sublanguages in one monolithic executable. It combines the power of C with the readability of PostScript. -- Jamie Zawinski

                          A Offline
                          A Offline
                          Andy Brummer
                          wrote on last edited by
                          #23

                          That's the lazy version. Monte Carlo only calculates some of the results and then assumes all the rest are the same. It's great using statistics to calculate statistical results. There's a 20% chance that there is a 30% chance that it was the second box. My goal is to look at code like a chessmaster looks at a chessboard to see positions and possibilites beyond lines and characters.

                          1 Reply Last reply
                          0
                          • B Brakanjan

                            Hi Could you guys check if my homework is correct: Q A box (A) contains 8 apples and 4 oranges Another box (B) containes 10 apples and 2 oranges A fruit is picked from a random box, and found to be an apple. what is the chance of this apple comming from box A. Use Bayes theorem. scroll down for my answer A: 8/12 * 1/2 ---------------------- 8/12 * 1/2 + 10/12 * 1/2 = 0.444

                            O Offline
                            O Offline
                            Orhun Birsoy
                            wrote on last edited by
                            #24

                            0.5 It is either from box A or not.;P

                            1 Reply Last reply
                            0
                            Reply
                            • Reply as topic
                            Log in to reply
                            • Oldest to Newest
                            • Newest to Oldest
                            • Most Votes


                            • Login

                            • Don't have an account? Register

                            • Login or register to search.
                            • First post
                              Last post
                            0
                            • Categories
                            • Recent
                            • Tags
                            • Popular
                            • World
                            • Users
                            • Groups