• starman2112@sh.itjust.works
      link
      fedilink
      arrow-up
      45
      ·
      edit-2
      11 months ago

      If you really wanna see a bloodbath, watch this:

      You know that a couple has two children. You go to the couple’s house and one of their children, a young boy, opens the door. What is the probability that the couple’s other child is a girl?

        • starman2112@sh.itjust.works
          link
          fedilink
          arrow-up
          9
          ·
          edit-2
          11 months ago

          Oops, I changed it to a more unintuitive one right after you replied! In my original comment, I said “you flip two coins, and you only know that at least one of them landed on heads. What is the probability that both landed on heads?”

          And… No! Conditional probability strikes again! When you flipped those coins, the four possible outcomes were TT, TH, HT, HH

          When you found out that at least one coin landed on heads, all you did was rule out TT. Now the possibilities are HT, TH, and HH. There’s actually only a 1/3 chance that both are heads! If I had specified that one particular coin landed on heads, then it would be 50%

          • Hacksaw@lemmy.ca
            link
            fedilink
            arrow-up
            48
            ·
            edit-2
            11 months ago

            No. It’s still 50-50. Observing doesn’t change probabilities (except maybe in quantum lol). This isn’t like the Monty Hall where you make a choice.

            The problem is that you stopped your probably tree too early. There is the chance that the first kid is a boy, the chance the second kid is a boy, AND the chance that the first kid answered the door. Here is the full tree, the gender of the first kid, the gender of the second and which child opened the door, last we see if your observation (boy at the door) excludes that scenario.

            1 2 D E


            B B 1 N

            B G 1 N

            G B 1 Y

            G G 1 Y

            B B 2 N

            B G 2 Y

            G B 2 N

            G G 2 Y

            You can see that of the scenarios that are not excluded there are two where the other child is a boy and two there the other child is a girl. 50-50. Observing doesn’t affect probabilities of events because your have to include the odds that you observe what you observed.

            • starman2112@sh.itjust.works
              link
              fedilink
              arrow-up
              3
              ·
              11 months ago

              Yes! They responded to my comment before the edit, where I gave the coin example: “I flipped two coins, at least one of them was heads. What is the probability that both of them are heads?”

              Before I read their reply, I edited it to the more confusing and infuriating two kids example. It’s annoying because it seems like it should be the same as saying “I have two children, and at least one is a boy. What is the probability that I have two boys?” In both the coin case and this one, the answer is 1/3, but when one child answers the door, it’s like sliding one quarter out from behind my hand. Now you know a particular (child, coin)'s (sex, face), and the answer is 50% again.

          • calcopiritus@lemmy.world
            link
            fedilink
            arrow-up
            5
            ·
            11 months ago

            You assume that the probability of TH = HT = HH

            When In fact, the probabilities are as follows:

            P(HT)+P(TH) = 50% P(HH) = 50%

            For all the probabilities being equal, you’d have to consider 4 cases:

            HT, TH, HH (1) and HH (2).

            The difference between HH (1) and HH (2) is which one you were told that was heads.

            Then P(HH) = P(HH (1)) + P(HH (2)) = 2/4 = 50%

            • starman2112@sh.itjust.works
              link
              fedilink
              arrow-up
              2
              ·
              11 months ago

              The issue is that you weren’t told a particular one was heads, only that at least one was heads. If I flipped a nickel and a dime, then the four possibilities are NtDt, NtDh, NhDt, and NhDh. If I say that at least one of them is heads but don’t tell you which one, then there are three possibilities: I flipped NhDt, NtDh, or NhDh. It’s only when I tell you that the nickel landed on heads that it collapses to NhDt and NhDh.

              Sorry if the acronyms are hard to read, they’re much faster than typing something like “Heads (nickel) tails (dime)”

              • calcopiritus@lemmy.world
                link
                fedilink
                arrow-up
                1
                ·
                11 months ago

                Again, you are assuming that every occurrence has the same chance. When in fact, they have not. There are 3 random events happening here:

                1. Flip of one coin (50% chance each)
                2. Flip of the other coin (50% chance each)
                3. The coin that you told me (let’s say it’s 50% nickel 50% dime for simplicity’s sake)

                Also, I am assuming that these 3 events are completely unrelated. That is, the result of a coin flip won’t determine whether you tell me the nickel or dime. A complete list of events is as follows:

                T T N

                T T D

                H T N

                H T D

                T H N

                T H D

                H H N

                H H D

                After telling me that one of them is heads, the list is as follows:

                H T D

                T H N

                H H D

                H H N

                H H is 50% chance, and the sum of HT + TH is the other 50%

                • starman2112@sh.itjust.works
                  link
                  fedilink
                  arrow-up
                  1
                  ·
                  edit-2
                  11 months ago

                  This is very easily simulated. I use Tasker, you can use Python or something. Assume 1 is heads and 2 is tails

                  1. Randomize variable %dime to 1 or 2

                  2. Randomize variable %nickel to 1 or 2

                  This flips two coins. At this point there’s a 25% chance of each TT, TH, HT, and HH occurring.

                  1. Goto 1 IF %dime != 1 AND %nickel != 1

                  This is the point where I tell you that at least one of them is heads, but not which. It flips the coins again only if they landed TT, which means there are three possible sets of coins now: TH, HT, or HH.

                  1. Add 1 to variable %HeadsTails IF %dime = 2 OR %nickel = 2

                  2. Add 1 to variable %HeadsHeads IF %dime = 1 AND %nickel = 1

                  This keeps track of what sets made it past line 3. If either is tails, it adds one to %HeadsTails. If neither is tails, then it adds one to %HeadsHeads

                  1. Add 1 to variable %Counter

                  2. Goto 1 IF %Counter <1000

                  You can set your counter as high as you like. Python would probably handle 10,000 flips faster than Tasker can handle 1,000, but I’m on my phone and also python illiterate.

                  Press play, and I get 357 sets with two heads, and 643 sets that have a tails. The longer it runs, the closer to a ratio of 1:2 it’ll get.

              • Glide@lemmy.ca
                link
                fedilink
                arrow-up
                7
                ·
                edit-2
                11 months ago

                But you do know which one it is, because you said “other child”. As soon as you ask the question, you assign a specific outcome to a specific child eliminating HH and HT (or in the new example, BB and BG). “What are the odds they have a female child” and “what are the odds the other child is female” are not the same question.

            • PotatoesFall@discuss.tchncs.de
              link
              fedilink
              arrow-up
              3
              ·
              11 months ago

              it depends on how you know this information. did you look at one of the coins? then it’s 50/50. did you ask a friend to look and yell you whether at least one of them is heads? then it’s 2/3.

          • Floey@lemm.ee
            link
            fedilink
            arrow-up
            1
            ·
            edit-2
            8 months ago

            This is a ridiculous argument when taken to the extreme. Say you have three bags. Bag A contains 100 blue marbles. Bag B contains 99 blue marbles and 1 red marble. Bag C contains 100 red marbles. You reach into a random bag and draw a red marble. You’ve only eliminated bag A. Would you say it is a 50-50 whether you are left with a bag now containing 99 blue marbles or 99 red marbles? No, the fact that you drew a red marble tells you something about the composition of the bag you drew from. The odds that you drew out of bag B is 1/101, the total number of red marbles in bag B divided by the total number of red marbles across all bags. The odds that you are dealing with bag C is 100x that.

            Now let’s say you have 4 bags. BB, BR, BR, and RR. You draw an R. There is a 50% chance you are dealing with bag 2 or 3 because together they contain 2 out of 4 R. There is also a 50% chance you are dealing with bag 4. So it is equally likely that you draw either color of marble if you take the remaining marble out of the bag you randomly selected despite there being twice as many BR bags as RR bags.

      • mindbleach@sh.itjust.works
        link
        fedilink
        arrow-up
        11
        ·
        11 months ago

        Cheeky bastard.

        It is 50-50, though. The remaining possible states are BG and BB. Both are equally likely. Any further inference is narrative… not statistics.

        The classic example of this is flipping 100 coins. If you get heads 99 times in a row… the last coin is still 50-50. Yes, it is obscenely unlikely to get heads 100 times in a row. But it’s already obscenely unlikely to get heads 99 times in a row. And it is obscenely unlikely to alternate perfectly between heads and tails. And it is obscenely unlikely to get a binary pattern spelling out the alphabet. And it is obscenely unlikely to get… literally any pattern.

        Every pattern is equally unlikely, with a fair coin. We see 99 heads in a row versus 1 tails at the end, and think it narrowly averted the least-probable outcome. But only because we lump together all sequences with exactly one tails. That’s one hundred different patterns. 1-99 is not the same as 99-1. We just treat them the same because we fixate on uniformity.

        Compare a non-binary choice: a ten-sided die. Thirty 1s in a row is about as unlikely as 100 heads in a row. But 1 1 1… 2 is the same as 1 1 1… 3. Getting the first 29 is pretty damn unlikely. One chance in a hundred million trillion. But the final die can land on any number 1-10. Nine of them upset the pattern our ape brains want. Wanting it doesn’t make it any more likely. Or any less likely.

        It would be identically unlikely for a 10-sided die to count from 1 to 10, three times in a row. All the faces appear equally. But swap any two events and suddenly it doesn’t count. No pun intended.

        If this couple had eight children, for some god-forsaken reason, and you saw seven boys, the eighth kid being another boy is not less likely for it. The possibility space has already been reduced to two possibilities out of… well nine, I suppose, if order doesn’t matter. They could have 0-8 boys. They have at least 7. The only field that says the last kid’s not a coin toss is genetics, and they say this guy’s chromosome game is strong.

        • starman2112@sh.itjust.works
          link
          fedilink
          arrow-up
          6
          ·
          edit-2
          11 months ago

          You’re right, but it’s not a subversion of the Gambler’s Fallacy, it’s a subversion of conditional probability. A classic example is that I have two kids, and at least one of them is a boy. What is the probability that I have two boys?

          The intuitive answer is 50%, because one kid’s sex doesn’t affect the other. But when I told you that I have two kids, there were four possibilities: GG, GB, BG, or BB. When I told you that at least one of them is a boy, all I did was take away the GG option. That means there’s only a 1 in 3 chance that I have two boys.

          But by having one child answer the door, I change it yet again–now we know the sex of a particular child. We know that the child who opened the door is a boy. This is now akin to saying “I have two children, and the eldest is a boy. What is the possibility that I have two boys?” It’s a sneaky nerd snipe, because it targets specifically people who know enough about statistics to know what conditional probability is. It’s also a dangerous nerd snipe, because it’s entirely possible that my reasoning is wrong!

      • Klear@lemmy.world
        link
        fedilink
        arrow-up
        4
        ·
        11 months ago

        And don’t forget that there’s always a slim chance that no matter the gender, the other child is GOAT.

      • starman2112@sh.itjust.works
        link
        fedilink
        arrow-up
        2
        ·
        11 months ago

        Two more for funsies! I flipped two coins. At least one of them landed on heads. What is the probability that both landed on heads? (Note: this is what my comment originally said before I edited it)

        I have two children. At least one of them is a boy born on a Tuesday. What is the probability that I have two boys?

  • mindbleach@sh.itjust.works
    link
    fedilink
    arrow-up
    104
    ·
    11 months ago

    Different compilers have robbed me of all trust in order-of-operations. If there’s any possibility of ambiguity - it’s going in parentheses. If something’s fucky and I can’t tell where, well, better parenthesize my equations, just in case.

  • Pavidus@lemmy.world
    link
    fedilink
    arrow-up
    97
    ·
    11 months ago

    There’s quite a few calculators that get this wrong. In college, I found out that Casio calculators do things the right way, are affordable, and readily available. I stuck with it through the rest of my classes.

  • Elderos@sh.itjust.works
    link
    fedilink
    arrow-up
    73
    ·
    11 months ago

    In some countries we’re taught to treat implicit multiplications as a block, as if it was surrounded by parenthesis. Not sure what exactly this convention is called, but afaic this shit was never ambiguous here. It is a convention thing, there is no right or wrong as the convention needs to be given first. It is like arguing the spelling of color vs colour.

      • Tlaloc_Temporal@lemmy.ca
        link
        fedilink
        arrow-up
        15
        ·
        11 months ago

        BEDMAS: Bracket - Exponent - Divide - Multiply - Add - Subtract

        PEMDAS: Parenthesis - Exponent - Multiply - Divide - Add - Subtract

        Firstly, don’t forget exponents come before multiply/divide. More importantly, neither defines wether implied multiplication is a multiply/divide operation or a bracketed operation.

        • And009@reddthat.com
          link
          fedilink
          arrow-up
          0
          ·
          11 months ago

          Exponents should be the first thing right? Or are we talking the brackets in exponents…

          • Tlaloc_Temporal@lemmy.ca
            link
            fedilink
            arrow-up
            4
            ·
            11 months ago

            Exponents are second, parentheses/brackets are always first. What order you do your exponents in is another ambiguity though.

              • Tlaloc_Temporal@lemmy.ca
                link
                fedilink
                arrow-up
                1
                ·
                8 months ago

                234 is ambiguous. 2(34) is standard practice, but some calculators aren’t that smart and will do (23)4.

                It’s ambiguous because it works both ways, not because we don’t have a standard. Confusion is possible.

                • The only confusion I can see is if you intended for the 4 to be an exponent of the 3 and didn’t know how to do that inline, or if you did actually intend for the 4 to be a separate numeral in the same term? And I’m confused because you haven’t used inline notation in a place that doesn’t support exponents of exponents without using inline notation (or a screenshot of it).

                  As written, which inline would be written as (2^3)4, then it’s 32. If you intended for the 4 to be an exponent, which would be written inline as 2^3^4, then it’s 2^81 (which is equal to whatever that is equal to - my calculator batteries are nearly dead).

                  we don’t have a standard

                  We do have a standard, and I told you what it was. The only confusion here is whether you didn’t know how to write that inline or not.

        • Pipoca@lemmy.world
          link
          fedilink
          arrow-up
          9
          ·
          11 months ago

          It’s BE(D=M)(A=S). Different places have slightly different acronyms - B for bracket vs P for parenthesis, for example.

          But multiplication and division are whichever comes first right to left in the expression, and likewise with subtraction.

          Although implicit multiplication is often treated as binding tighter than explicit. 1/2x is usually interpreted as 1/(2x), not (1/2)x.

          • unoriginalsin@lemmy.world
            link
            fedilink
            Afaraf
            arrow-up
            1
            ·
            11 months ago

            It’s BE(D=M)(A=S). Different places have slightly different acronyms - B for bracket vs P for parenthesis, for example.

            But, since your rule has the D&M as well as the A&S in brackets does that mean your rule means you have to do D&M as well as the A&S in the formula before you do the exponents that are not in brackets?

            But seriously. Only grade school arithmetic textbooks have formulas written in this ambiguous manner. Real mathematicians write their formulas clearly so that there isn’t any ambiguity.

            • Pipoca@lemmy.world
              link
              fedilink
              arrow-up
              2
              ·
              edit-2
              11 months ago

              That’s not really true.

              You’ll regularly see textbooks where 3x/2y is written to mean 3x/(2y) rather than (3x/2)*y because they don’t want to format

              3x
              ----
              2y
              

              properly because that’s a terrible waste of space in many contexts.

          • CheesyFox@lemmy.world
            link
            fedilink
            arrow-up
            1
            ·
            11 months ago

            a fair point, but aren’t division and subtraction are non-communicative, hence both operands need to be evaluated first?

        • And009@reddthat.com
          link
          fedilink
          arrow-up
          7
          ·
          edit-2
          11 months ago

          Multiplication VS division doesn’t matter just like order of addition and subtraction doesn’t matter… You can do either and get same results.

          Edit : the order matters as proven below, hence is important

        • Squirrel@thelemmy.club
          link
          fedilink
          English
          arrow-up
          2
          ·
          11 months ago

          I was taught that division is just inverse multiplication, and to be treated as such when it came to the order of operations (i.e. they are treated as the same type of operation). Ditto with addition and subtraction.

    • doctorcrimson@lemmy.today
      link
      fedilink
      arrow-up
      14
      ·
      11 months ago

      I think when a number or variable is adjacent a bracket or parenthesis then it’s distribution to the terms within should always take place before any other multiplication or division outside of it. I think there is a clear right answer and it’s 1.

      • derphurr@lemmy.world
        link
        fedilink
        arrow-up
        14
        ·
        11 months ago

        No there is no clear right answer because it is ambiguous. You would never seen it written that way.

        Does it mean A÷[(B)©] or A÷B*C

        • doctorcrimson@lemmy.today
          link
          fedilink
          arrow-up
          2
          ·
          edit-2
          11 months ago

          It means

          A ÷ B(C) which is equivalent to A ÷ (B*C)
          

          I literally just explained this. The Parenthesis takes priority over multiplication and division outright.

          Maybe
          B*C = B(C)
          But
          A ÷ B(C) =! A ÷ B * C
          
          • derphurr@lemmy.world
            link
            fedilink
            arrow-up
            2
            ·
            edit-2
            11 months ago

            No. It’s ambiguous. In a math book or written by anyone that actually uses math, you don’t have a “%”

            You group stuff below the line, and you use parens and brackets to group things like (a + b) and (x)(y) so that it is not ambiguous.

            2/xy would be almost always interpreted differently than 2/x(x+y) which is ambiguous and could mean (2/x)(x+y) or 2/[(x)(x+y)]

            • doctorcrimson@lemmy.today
              link
              fedilink
              arrow-up
              2
              ·
              11 months ago

              You continue to say it’s ambiguous, but the most commonly used convention on earth very clearly prioritizes parenthesis. It is not ambiguous.

  • linuxdweeb@lemm.ee
    link
    fedilink
    arrow-up
    72
    ·
    11 months ago

    Please Excuse My Dear Aunt Sally, she downloaded a shitty ad-infested calculator from the Google Play store.

  • subignition@kbin.social
    link
    fedilink
    arrow-up
    62
    ·
    edit-2
    11 months ago

    […] the question is ambiguous. There is no right or wrong if there are different conflicting rules. The only ones who claim that there is one rule are the ones which are wrong!

    https://people.math.harvard.edu/~knill/pedagogy/ambiguity/index.html

    As youngsters, math students are drilled in a particular
    convention for the “order of operations,” which dictates the order thus:
    parentheses, exponents, multiplication and division (to be treated
    on equal footing, with ties broken by working from left to right), and
    addition and subtraction (likewise of equal priority, with ties similarly
    broken). Strict adherence to this elementary PEMDAS convention, I argued,
    leads to only one answer: 16.

    Nonetheless, many readers (including my editor), equally adherent to what
    they regarded as the standard order of operations, strenuously insisted
    the right answer was 1. What was going on? After reading through the
    many comments on the article, I realized most of these respondents were
    using a different (and more sophisticated) convention than the elementary
    PEMDAS convention I had described in the article.

    In this more sophisticated convention, which is often used in
    algebra, implicit multiplication is given higher priority than explicit
    multiplication or explicit division, in which those operations are written
    explicitly with symbols like x * / or ÷. Under this more sophisticated
    convention, the implicit multiplication in 2(2 + 2) is given higher
    priority than the explicit division in 8÷2(2 + 2). In other words,
    2(2+2) should be evaluated first. Doing so yields 8÷2(2 + 2) = 8÷8 = 1.
    By the same rule, many commenters argued that the expression 8 ÷ 2(4)
    was not synonymous with 8÷2x4, because the parentheses demanded immediate
    resolution, thus giving 8÷8 = 1 again.

    This convention is very reasonable, and I agree that the answer is 1
    if we adhere to it. But it is not universally adopted.

  • GTG3000@programming.dev
    link
    fedilink
    arrow-up
    51
    ·
    11 months ago

    I’m with the right answer here. / and * have same precedence and if you wanted to treat 2(2+2) as a single unit, you should have written it like (2*(2+2)).

    • Klear@lemmy.world
      link
      fedilink
      arrow-up
      3
      ·
      11 months ago

      Yeah, if there’s any ambiguity, you probably should have written it in a different way.

  • arisunz@lemmy.blahaj.zone
    link
    fedilink
    arrow-up
    32
    ·
    11 months ago

    this comment section illustrates perfectly why i hate maths so much lmao

    love ambiguous, confusing rules nobody can even agree on!

    • onion@feddit.de
      link
      fedilink
      arrow-up
      38
      ·
      11 months ago

      The problem isn’t math, it’s the people that suck at at it who write ambigous terms like this, and all the people in the comments who weren’t educated properly on what conventions are.

      • Swallowtail@beehaw.org
        link
        fedilink
        arrow-up
        5
        ·
        11 months ago

        Yeah, you could easily make this more straightforward by putting parentheses around 8÷2. It’s like saying literature sucks because Finnegans Wake is incomprehensible.

        • you could easily make this more straightforward by putting parentheses around 8÷2

          But that would be a different expression with a different answer (16 rather than 1). This is the mistake made by the programmer of the e-calc - treats it as though there’s extra brackets there when there isn’t.

      • loops@beehaw.org
        link
        fedilink
        English
        arrow-up
        3
        ·
        11 months ago

        Huge shout out to the jaded AF high school math teachers that don’t give a fuck any more!

        • They do care. The issue is everyone argues about it without even asking Maths teachers about it to being with! I guarantee (I’ve seen it myself) literally every blog you read which says this is “ambiguous”, without exception they never mention Maths textbooks or Maths teachers (because then they wouldn’t be able to bombastically declare “This is ambiguous!”).

    • UnRelatedBurner@sh.itjust.works
      link
      fedilink
      arrow-up
      17
      ·
      11 months ago

      lol, math is literally the only subject that has rules set in stone. This example is specifically made to cause confusion. Division has the same priority as multiplication. You go from left to right. problem here is the fact that you see divison in fraction form way more commonly. A fraction could be writen up as (x)/(y) not x/y (assuming x and y are multiple steps). Plain and simple.

      The fact that some calculator get it wrong means that the calculator is wrongly configured. The fact that some people argue that you do () first and then do what’s outside it means that said people are dumb.

      They managed to get me once too, by everyone spreading missinformation so confidently. Don’t even trust me, look up the facts for yourself. And realise that your comment is just as incorrect as everyone who said the answer is 1. (uhm well they don’t agree on 0^0, but that’s kind of a paradox)

      • Primarily0617@kbin.social
        link
        fedilink
        arrow-up
        11
        ·
        11 months ago

        math is literally the only subject that has rules set in stone

        go past past high school and this isn’t remotely true

        there are areas of study where 1+1=1

      • kpw@kbin.social
        link
        fedilink
        arrow-up
        9
        ·
        11 months ago

        Off topic, but the rules of math are not set in stone. We didn’t start with ZFC, some people reject the C entirely, then there is intuitionistic logic which I used to laugh at until I learned about proof assistants and type theory. And then there are people who claim we should treat the natural numbers as a finite set, because things we can’t compute don’t matter anyways.

        On topic: Parsing notation is not a math problem and if your notation is ambiguous or unclear to your audience try to fix it.

      • math is literally the only subject that has rules set in stone

        Indeed, it does.

        This example is specifically made to cause confusion.

        No, it isn’t. It simply tests who has remembered all the rules of Maths and who hasn’t.

        Division has the same priority as multiplication

        And there’s no multiplication here - only brackets and division (and addition within the brackets).

        A fraction could be writen up as (x)/(y) not x/y

        Neither of those. A fraction could only be written inline as (x/y) - both of the things you wrote are 2 terms, not one. i.e. brackets needed to make them 1 term.

        The fact that some people argue that you do () first and then do what’s outside it means that

        …they know all the relevant rules of Maths

        look up the facts for yourself

        You can find them here

        your comment is just as incorrect as everyone who said the answer is 1

        and 1 is 100% correct.

        well they don’t agree on 0^0

        Yes they do - it’s 1 (it’s the 5th index law). You might be thinking of 0/0, which depends on the context (you need to look at limits).

            • UnRelatedBurner@sh.itjust.works
              link
              fedilink
              arrow-up
              1
              ·
              edit-2
              7 months ago

              Fuck it, I’m gonna waste time on a troll on the internet who’s necroposting in te hopes that they actually wanna argue the learning way.

              This example is specifically made to cause confusion.

              No, it isn’t. It simply tests who has remembered all the rules of Maths and who hasn’t.

              I said this because of the confusion around the division sign. Almost everyone at some point got it confused, or is just hell bent that one is corrent the other is not. In reality, it is such a common “mistake” that ppl started using it. I’m talking about the classic 4/2x. If x = 2, it is:

              1. 4/2*2 = 2*2 = 4
              2. 4/(2*2) = 4/4 = 1

              Wolfram solved this with going with the second if it is an X or another variable as it’s more intuitive.

              Division has the same priority as multiplication

              And there’s no multiplication here - only brackets and division (and addition within the brackets).

              Are you sure ur not a troll? how do you calculate 2(1+1)? It’s 4. It’s called implicit multiplication and we do it all the time. It’s the same logic that if a number doesn’t have a sign it’s positive. We could write this up as +2*(+1+(+1)), but it’s harder to read, so we don’t.

              A fraction could be writen up as (x)/(y) not x/y

              Neither of those. A fraction could only be written inline as (x/y) - both of the things you wrote are 2 terms, not one. i.e. brackets needed to make them 1 term.

              I don’t even fully understand you here. If we have a faction; at the top we have 1+2 and at the bottom we have 6-3. inline we could write this as (1+2)/(6-3). The result is 1 as if we simplify it’s 3/3.

              You can’t say it’s ((1+2)/(6-3)). It’s the same thing. You will do the orders differently, but I can’t think of a situation where it’s incorrect, you are just making things harder on yourself.

              The fact that some people argue that you do () first and then do what’s outside it means that

              …they know all the relevant rules of Maths

              You fell into the 2nd trap too. If there is a letter or number or anything next to a bracket, it’s multiplication. We just don’t write it out, as why would we, to make it less readable? 2x is the same as 2*x and that’s the same as 2(x).

              look up the facts for yourself

              You can find them here

              I can’t even, you linked social media. The #1 most trust worthy website. Also I can’t even read this shit. This guy talks in hashtags. I won’t waste energy filtering out all the bullshit to know if they are right or wrong. Don’t trust social media. Grab a calculator, look at wolfram docs, ask a professor or teacher. Don’t even trust me!

              your comment is just as incorrect as everyone who said the answer is 1

              and 1 is 100% correct.

              I chose a side. But that side it the more RAW solution imo. let’s walk it thru:

              • 8/2(2+2), let’s remove the confusion
              • 8/2*(2+2), brackets
              • 8/2*(4), mult & div, left -> right
              • 4*(4), let go
              • 4*4, the only
              • 16, answer

              BUT, and as I stated above IF it’d be like: 8/2x with x=2+2 then, we kinda decided to put implicit brackets there so it’s more like 8/(2x), but it’s just harder to read, so we don’t.

              And here is the controversy, we are playing the same game. Because there wasn’t a an explicit multilication, you could argue that it should be handled like the scenario with the x. I disagree, you agree. But even this argument of “like the scenario with the x” is based of what Wolfram decided, there are no rules of this, you do what is more logical in this scenario. It can be a flaw in math, but it never comes up, as you use fractions instead of inline division. And when you are converting to inline, you don’t spear the brackets.

              well they don’t agree on 0^0

              Yes they do - it’s 1 (it’s the 5th index law). You might be thinking of 0/0, which depends on the context (you need to look at limits).

              You said it yourself, if we lim (x->0) y/x then there is an answer. But we aren’t in limits. x/0 in undefined at all circumstances (I should add that idk abstract algebra & non-linear geometry, idk what happens there. So I might be incorrect here).


              And by all means, correct me if I’m wrong. But link something that isn’t an unreadable 3 parted mostodon post like it’s some dumb twitter argument. This is some dumb other platform argument. Or don’t link anything at all, just show me thru, and we know math rules (now a bit better) so it shouldn’t be a problem… as long as we are civilised.

              side note: if I did some typos… it’s 2am, sry.

              • I’m talking about the classic 4/2x. If x = 2, it is:

                4/2x2 = 2x2 = 4

                4/(2x2) = 4/4 = 1

                It’s the latter, as per the definition of Terms. There are references to this definition being used going back more than 100 years.

                Wolfram solved this with going with the second if it is an X or another variable as it’s more intuitive

                Yes, they do if it’s 2x, but not if it’s 2(2+2) - despite them mathematically being the same thing - leading to wrong answers to expressions such as the OP. In fact, that’s true of every e-calculator I’ve ever seen, except for MathGPT (Desmos used to handle it correctly, but then they made a change to make it easier to enter fractions, and consequently broke evaluating divisions correctly).

                how do you calculate 2(1+1)? It’s 4. It’s called implicit multiplication

                No, it’s not called implicit multiplication. It’s distribution.

                We could write this up as +2*(+1+(+1))

                No, you can’t. Adding that multiplication has broken it up into 2 terms. You either need to not add the multiply, or add another set of brackets if you do, to keep it as 1 term.

                I can’t think of a situation where it’s incorrect

                If a=2 and b=3, then…

                1/axb=3/2

                1/ab=(1/6)

                If there is a letter or number or anything next to a bracket, it’s multiplication

                No, it’s distribution. Multiplication refers literally to multiplication signs, of which there aren’t any in this expression.

                2x is the same as 2*x

                No, 2A is the same as (2xA). i.e. it’s a single Term. 2xA is 2 Terms (multiplied).

                If a=2 and b=3, then…

                axb=2x3 (2 terms)

                ab=6 (1 term)

                This guy talks in hashtags.

                Only in the first post in each thread, so that people following those hashtags will see the first post, and can then click on it if they want to see the rest of the thread. Also “this guy” is me. :-)

                Grab a calculator, look at wolfram docs, ask a professor or teacher

                I’m a Maths teacher with a calculator and many textbooks - I’m good. :-) Also, if you’d clicked on the thread you would’ve found textbook references, historical Maths documents, proofs, the works. :-)

                8/2(2+2), let’s remove the confusion

                8/2*(2+2), brackets

                8/2*(4), mult & div, left -> right

                4*(4), let go

                2 mistakes here. Adding the multiplication sign in the 2nd step has broken up the term in the denominator, thus sending the (2+2) into the numerator, hence the wrong answer (and thus why we have a rule about Terms). Then you did division when there was still unsolved brackets left, thus violating order of operations rules.

                it’s more like 8/(2x), but it’s just harder to read, so we don’t

                But that’s exactly what we do (but no extra brackets needed around 2x nor 2(2+2) - each is a single term).

                you could argue that it should be handled like the scenario with the x

                Which is what the rules of Maths tells us to do - treat a single term as a single term. :-)

                there are no rules of this

                Yeah, there is. :-)

                you use fractions instead of inline division

                No, never. A fraction is a single term (grouped by a fraction bar) but division is 2 terms (separated by the division operator). Again it’s the definition of Terms.

                And by all means, correct me if I’m wrong

                Have done, and appreciate the proper conversation (as opposed to those who call me names for simply pointing out the actual rules of Maths).

                link something that isn’t an unreadable

                No problem. I t doesn’t go into as much detail as the Mastodon thread though, but it’s a shorter read (overall - with the Mastodon thread I can just link to specific parts though, which makes it handier to use for specific points), just covering the main issues.

                as long as we are civilised

                Thanks, appreciated.

                • UnRelatedBurner@sh.itjust.works
                  link
                  fedilink
                  arrow-up
                  1
                  ·
                  7 months ago

                  Idk where you teach, but I’m thankful you didn’t teach me.

                  Let me quizz you, how do you solve 2(2+2)^2? because acording to your linked picture, because brackets are leftmost you do them first. If I were to believe you:

                  • (2*2+2*2)^2
                  • (4+4)^2, = 64

                  but it’s just simply incorrect.

                  • 2(4)^2, wow we’re at a 2x^2
                  • 2*16 = 32

                  The thing that pisses me off most, is the fact that, yes. Terms exists, yes they have all sorts of properties. But they are not rules, they are properties. And they only apply when we have unknows and we’re at the most simplified form. For example your last link, the dude told us that those terms get prio because they are terms!? There are no mention of term prio in the book. It just simply said that when we have a simplified expression like: 2x^2+3x+5 we call 2x^2 and 3x and 5 terms. And yes they get priority, not because we named them those, but because they are multiplications. These help us at functions the most. Where we can assume that the highest power takes the sign at infinity. Maybe if the numbers look right, we can guess where it’d switch sign.

                  I don’t even want to waste energy proofreading this, or telling you the obvious that when we have a div. and a mult. and no x’s there really is no point in using terms, as we just get a single number.

                  But again, I totally understand why someone would use this, it’s easier. But it’s not the rule still. That’s why at some places this is the default. I forgot the name/keywords but if you read a calculator’s manual there must be a chapter or something regarding this exact issue.

                  So yeah, use it. It’s good. Especially if you teach physics. But please don’t go around making up rules.

                  As for your sources, you still linked a blog post.

    • RickRussell_CA@lemmy.world
      link
      fedilink
      English
      arrow-up
      10
      ·
      11 months ago

      It doesn’t have to be confusing. This particular formula is presented in a confusing way. Written differently, the ambiguity is easily resolved.

    • darthelmet@lemmy.world
      link
      fedilink
      arrow-up
      10
      ·
      11 months ago

      This is more language/writing style than math. The math is consistent, what’s inconsistent is there are different ways to express math, some of which, quite frankly, are just worse at communicating the mathematical expression clearly than others.

      Personally, since doing college math classes, I don’t think I’d ever willingly write an expression like that exactly because it causes confusion. Not the biggest issue for a simple problem, much bigger issue if you’re solving something bigger and need combine a lot of expressions. Just use parentheses and implicit multiplication and division. It’s a lot clearer and easier to work with.

        • darthelmet@lemmy.world
          link
          fedilink
          arrow-up
          1
          ·
          7 months ago

          Something about the way this thread was written was kind of confusing, so I don’t really get what their point was. Is it just that the terminology is wrong? Or am I missing something?

          Like, whatever you call it, a x b, a*b, ab, and a(b) are all acceptable notations to describe the operation “multiply a and b.” Some are nicer to use than others depending on the situation.

          • Something about the way this thread was written was kind of confusing,

            Ok, sorry about that. I’m more than happy to update it if you want to give me some constructive feedback on what was confusing about it. Note though that this was the 3rd part in the series, and maybe you didn’t go back and read the previous 2 parts? They start here

            Is it just that the terminology is wrong? Or am I missing something?

            Yes and yes. :-) The 2 actual rules of Maths that apply here are Terms and The Distributive Law. These are 2 different rules of Maths - neither of which is “multiplication” - and so when lumping them together as “implicit multiplication” you end up with unpredictable, and usually wrong, answers. The only way to always get the right answer is to follow the actual rules of Maths.

            a x b, a*b, ab, and a(b) are all acceptable notations to describe the operation “multiply a and b.”

            No, they’re not. The first two are multiplications, the second two are Terms. Note that a Term is a product, the result of a multiplication. In the mnemonics, “Multiplication”" refers literally to multiplication signs, and nothing else.

            • darthelmet@lemmy.world
              link
              fedilink
              arrow-up
              2
              ·
              7 months ago

              Ok, sorry about that. I’m more than happy to update it if you want to give me some constructive feedback on what was confusing about it. Note though that this was the 3rd part in the series, and maybe you didn’t go back and read the previous 2 parts? They start here

              NP. I’m not really great at giving writing advice, so can’t really help there. Something about it just didn’t click when I read it. The extra context you linked did help a bit.

              As far as the issue: After reading it I think it does just seem to be a matter of terminology mixed with problems that arise with when you need to write math expressions inline in text. If you can write things out on paper or use a markdown language, it’s really easy to see how a fractional expression is structured.

              8

              2(1+3)

              is a lot easier to read than 8/2(1+3) even if they technically are meant to be evaluated the same. There’s no room for confusion.

              And as for distributive law vs multiplication, maybe this is just taking for granted a thing that I learned a long time ago, but to me they’re just the same thing in practice. When I see a(x+1) I know that in order to multiply these I need to distribute. And if we fill in the algebraic symbols for numbers, you don’t even need to distribute to get the answer since you can just evaluate the parentheses then use the result to multiply by the outside.

              Conversely, if I was factoring something, I would need to do division.

              ax + a

              a

              = x+1, thus: a(x+1)

              I think we’re basically talking about the same thing, I’m just being a bit lose with the terminology.

              And while we’re at it, the best way to make sure there’s no misunderstanding is to just use parenthesis for EVERYTHING! I’m mostly kidding, this can rapidly get unreadable once you nest more than a few parens, although for these toy expressions, it would have the desired effect.

              (8)/(2(1+3)) is obviously different than (8/2)(1+3)

              • 8/2(1+3) even if they technically are meant to be evaluated the same

                But 8/2(1+3) isn’t a fraction. The / - the computing equivalent of ÷ (which can only be written using Unicode on a computer, so a bit of a pain to use compared to / )- is an operator, which means they’re 2 separate terms. A fraction bar is a grouping symbol, which means it’s 1 term. In this particular case it doesn’t matter, but if it appeared in a bigger expression then it absolutely does matter. The way to write 8/2(1+3) as a fraction inline is to add extra brackets. i.e. (8/2(1+3)) - because brackets are also a grouping symbol.

                And as for distributive law vs multiplication, maybe this is just taking for granted a thing that I learned a long time ago, but to me they’re just the same thing in practice

                Bu they’re not, for the same reason. Firstly, the Distributive Law isn’t multiplication at all - which only applies literally to multiplication symbols - it applies to bracketed terms (i.e. is a single term which needs to be distributed) - and secondly it applies to a single term, whereas multiplication applies to 2 terms (one before and one after). Anyone who talks about 2(1+3) needing to be “multiplied” has already made the mistake that is going to lead to a wrong answer (unless they just happen to “multiply” before they divide, which is an accidental way to get the right answer).

                if I was factoring something

                Indeed, that is the precise reason the Distributive Law exists - they are the opposite operation to each other! Anyone who adds a multiplication symbol has broken up the factorised term, again leading to the wrong answer.

                I’m just being a bit lose with the terminology

                Yeah, and that’s all I was pointing out in the first place - please don’t use “implicit multiplication”. The term itself - i.e. it includes “multiplication” - leads people to do it wrong (because they treat it as multiplication, not brackets, then argue about the precedence of “multiplication”!). It needs to die!

                this can rapidly get unreadable once you nest more than a few parens,

                Well that’s why the rules of Terms ab=(axb) and The Distributive Law a(b+c)=(a*(b+c))=(ab+ac) exist to begin with - less brackets! :-) Imagine having to write a fraction as (1/(axb)) all the time!

                (8)/(2(1+3)) is obviously different than (8/2)(1+3)

                Correct, though a lot of people treat it as the latter (yet another way to do it wrong - doing division before brackets) because they figure the 8/2 is “outside the brackets”, but in fact only the 2 is, because the slash separates them as being 2 terms.

    • 4am@lemm.ee
      link
      fedilink
      arrow-up
      7
      ·
      11 months ago

      PEMDAS

      Parenthesis, exponents, multiplication, division, addition, subtraction.

      The rule is much older than me and they taught it in school. Nothing ambiguous about it, homie. The phone app is fucked up. Calculator nailed it.

  • I Cast Fist@programming.dev
    link
    fedilink
    English
    arrow-up
    25
    ·
    11 months ago

    The problem is that there’s no “external” parentheses to really tell us which is right: (8 / 2) * 4 or 8 / (2 * 4)

    The amount of comments here shows how much debate this “simple” thing generates

  • Queue@lemmy.blahaj.zone
    link
    fedilink
    English
    arrow-up
    24
    ·
    edit-2
    8 months ago

    For anyone like me who has math as their worst subject: PEMDAS.

    PEMDAS is an acronym used to mention the order of operations to be followed while solving expressions having multiple operations. PEMDAS stands for P- Parentheses, E- Exponents, M- Multiplication, D- Division, A- Addition, and S- Subtraction.

    So we gotta do it in the proper order. And remember, if the number is written like 2(3) then its multiplication, as if it was written 2 x 3 or 2 * 3.

    So we read 8/2(2+2) and need to do the following;

    • Read the Parentheses of (2 + 2) and follow the order of operations within them, which gets us 4.
    • Then we do 2(4) which is the same as 2 x 4 which is 8
    • 8 / 8 is 1.

    The answer is 1. The old calculator is correct, the phone app which has ads backed into it for a thing that all computers were invented to do is inaccurate.

    • a_fine_hound@lemmy.world
      link
      fedilink
      arrow-up
      32
      ·
      edit-2
      11 months ago

      Well that’s just wrong… Multiplication and division have equal priorities so they are done from left to right. So: 8 / 2 * (2 + 2)=8 / 2 * 4=4 * 4=16

        • Correct! 2(2+2) is a single term - subject to The Distributive Law - and 2x(2+2) is 2 terms. Those who added a multiply sign there have effectively flipped the (2+2) from being in the denominator to being in the numerator, hence the wrong answer.

          But it’s not called “implicit multiplication” - it’s Terms and/or The Distributive Law which applies (and they’re 2 separate rules, so you cannot lump them together as a single rule).

      • nutcase2690@lemmy.dbzer0.com
        link
        fedilink
        arrow-up
        4
        ·
        11 months ago

        Not quite, pemdas can go either from the left or right (as long as you are consistent) and division is the same priority as multiplication because dividing by something is equal to multiplying by the inverse of that thing… same as subtraction being just addition but you flip the sign.

        8×1/2=8/2 1-1=1+(-1)

        The result is 16 if you rewrite the problem with this in mind: 8÷2(2+2)=8×(1/2)×(2+2)

        • Omega_Jimes@lemmy.ca
          link
          fedilink
          arrow-up
          9
          ·
          11 months ago

          I’ve never had anyone tell me operations with the same priority can be done either way, it’s always been left to right.

          • nutcase2690@lemmy.dbzer0.com
            link
            fedilink
            arrow-up
            4
            ·
            11 months ago

            I’ve always heard it that way too but I think it is for consistency with students, imo Logically, if you are looking at division = multiplying by inverse and subtraction = adding the negative, you should be able to do it both ways. Addition and multiplication are both associative, so we can do 1+2+3 = (1+2)+3 = 1+(2+3) and get the same answer.

            • ReveredOxygen@sh.itjust.works
              link
              fedilink
              English
              arrow-up
              1
              ·
              11 months ago

              But subtraction and division are not associative. Any time you work on paper, 2 - 2 - 2 would equal -2. That is, (2-2)-2=0-2=-2. If you evaluate right to left, you get 2-2-2=2-(2-2)=2-0=2

              • nutcase2690@lemmy.dbzer0.com
                link
                fedilink
                arrow-up
                3
                ·
                11 months ago

                Correct, subtraction and division are not associative. However, what is subtraction if not adding the opposite of a number? Or division if not multiplying the inverse? And addition and multiplication are associative.

                2-2-2 can be written as 2 + (-2) + (-2) which would equal -2 no matter if you solve left to right, or right to left.

                In your example with the formula from right to left, distributing the negative sign reveals that the base equation was changed, so it makes sense that you saw a different answer.

                2 - (2 - 2) = 2 + ((-2) + 2) = 2

          • I’ve never had anyone tell me operations with the same priority can be done either way, it’s always been left to right

            It’s left to right within each operator. You can do multiplication first and division next, or the other way around, as long as you do each operator left to right. Having said that, you also can do the whole group of equal precedence operators left to right - because you’re still preserving left to right for each of the two operators - so you can do multiplication and division left to right at the same time, because they have equal precedence.

            Having said that, it’s an actual rule for division, but optional for the rest. The actual rule is you have to preserve left-associativity - i.e. a number is associated with the sign to the left of it - and going left to right is an easy way to do that.

    • CaptDust@sh.itjust.works
      link
      fedilink
      arrow-up
      20
      ·
      edit-2
      11 months ago

      Uh… no the 1 is wrong? Division and multiplication have the same precedence, so the correct order is to evaluate from left to right, resulting in 16.

    • nutcase2690@lemmy.dbzer0.com
      link
      fedilink
      arrow-up
      13
      ·
      11 months ago

      The problem with this is that the division symbol is not an accurate representation of the intended meaning. Division is usually written in fractions which has an implied set of parenthesis, and is the same priority as multiplication. This is because dividing by a number is the same as multiplying by the inverse, same as subtracting is adding the negative of a number.

      8/2(2+2) could be rewritten as 8×1/2×(2+2) or (8×(2+2))/2 which both resolve into 16.

      • Division is usually written in fractions

        Division and fractions aren’t the same thing.

        fractions which has an implied set of parenthesis

        Fractions are explicitly Terms. Terms are separated by operators (such as division) and joined by grouping symbols (such as a fraction bar), so 1÷2 is 2 terms, but ½ is 1 term.

        8/2(2+2) could be rewritten as 8×1/2×(2+2)

        No, it can’t. 2(2+2) is 1 term, in the denominator. When you added the multiply you broke it into 2 terms, and sent the (2+2) into the numerator, thus leading to a different answer. 8/2(2+2)=1.

    • amtwon@lemmy.world
      link
      fedilink
      English
      arrow-up
      13
      ·
      11 months ago

      not to be That Guy, but the phone is actually correct… multiplication and division have the same precedence, so 8 / 2 * 4 should give the same result as 8 * 4 / 2, ie 16

    • agamemnonymous@sh.itjust.works
      link
      fedilink
      arrow-up
      3
      ·
      11 months ago

      P E M D A S

      vs

      P E M/D A/S

      The latter is correct, Multiplication/Division, and Addition/Subtraction each evaluate left to right (when not made unambiguous by Parentheses). I.e., 6÷2×3 = 9, not 1. That said, writing the expression in a way that leaves ambiguity is bad practice. Always use parentheses to group operations when ambiguity might arise.

    • Cornelius_Wangenheim@lemmy.world
      link
      fedilink
      arrow-up
      2
      ·
      edit-2
      11 months ago

      Ignore the idiots telling you you’re wrong. Everyone with a degree in math, science or engineering makes a distinction between implicit and explicit multiplication and gives implicit multiplication priority.

    • hallettj@beehaw.org
      link
      fedilink
      English
      arrow-up
      2
      ·
      11 months ago

      The problem is that the way PEMDAS is usually taught multiplication and division are supposed to have equal precedence. The acronym makes it look like multiplication comes before division, but you’re supposed to read MD and as one step. (The same goes for addition and subtraction so AS is also supposed to be one step.) It this example the division is left of the multiplication so because they have equal precedence (according to PEMDAS) the division applies first.

      IMO it’s bad acronym design. It would be easier if multiplication did come before division because that is how everyone intuitively reads the acronym.

      Maybe it should be PE(M/D)(A/S). But that version is tricky to pronounce. Or maybe there shouldn’t be an acronym at all.

    • Coreidan@lemmy.world
      link
      fedilink
      English
      arrow-up
      2
      ·
      11 months ago

      PEMDAS evaluated from left to right. If you followed that you’d get 16. 1 is ignoring left to right.

    • Turns out I’m wrong, but I haven’t been told how or why. I’m willing to learn if people actually tell me

      Well, I don’t know what you said originally, so I don’t know what it is you were told was wrong - 1 or 16? 😂 The correct answer is 1.

      Anyhow, I have an order of operations thread which covers literally everything there is to know about it (including covering all the common mistakes and false claims made by some). It includes textbook references, historical Maths documents, worked examples, proofs, memes, the works! I’m a high school Maths teacher/tutor - I’ve taught this topic many times.