How to get the following table?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
2
down vote

favorite
2












I want to make this table: enter image description here



Whereas, I get this one: enter image description here
Any suggestions for the code I wrote below?



begincenter
begintabular
& $A$ & NOT $A$ & SUM\ hline
$B$ & $P(A$ AND$,B)$ & $P($NOT $A$ AND$,B)$ & $P(B)$\
NOT $B$ &$P(A,$NOT$,B)$ &$P($NOT $A,$AND NOT$,B)$ & $P($NOT $B)$ \ hline
& $P(A)$ & $P($NOT $A)$& $1$\ hline
endtabular
endcenter






share|improve this question






















  • Welcome to TeX.SE! Can the text font not be the same?
    – manooooh
    Aug 30 at 1:08














up vote
2
down vote

favorite
2












I want to make this table: enter image description here



Whereas, I get this one: enter image description here
Any suggestions for the code I wrote below?



begincenter
begintabular
& $A$ & NOT $A$ & SUM\ hline
$B$ & $P(A$ AND$,B)$ & $P($NOT $A$ AND$,B)$ & $P(B)$\
NOT $B$ &$P(A,$NOT$,B)$ &$P($NOT $A,$AND NOT$,B)$ & $P($NOT $B)$ \ hline
& $P(A)$ & $P($NOT $A)$& $1$\ hline
endtabular
endcenter






share|improve this question






















  • Welcome to TeX.SE! Can the text font not be the same?
    – manooooh
    Aug 30 at 1:08












up vote
2
down vote

favorite
2









up vote
2
down vote

favorite
2






2





I want to make this table: enter image description here



Whereas, I get this one: enter image description here
Any suggestions for the code I wrote below?



begincenter
begintabular
& $A$ & NOT $A$ & SUM\ hline
$B$ & $P(A$ AND$,B)$ & $P($NOT $A$ AND$,B)$ & $P(B)$\
NOT $B$ &$P(A,$NOT$,B)$ &$P($NOT $A,$AND NOT$,B)$ & $P($NOT $B)$ \ hline
& $P(A)$ & $P($NOT $A)$& $1$\ hline
endtabular
endcenter






share|improve this question














I want to make this table: enter image description here



Whereas, I get this one: enter image description here
Any suggestions for the code I wrote below?



begincenter
begintabular
& $A$ & NOT $A$ & SUM\ hline
$B$ & $P(A$ AND$,B)$ & $P($NOT $A$ AND$,B)$ & $P(B)$\
NOT $B$ &$P(A,$NOT$,B)$ &$P($NOT $A,$AND NOT$,B)$ & $P($NOT $B)$ \ hline
& $P(A)$ & $P($NOT $A)$& $1$\ hline
endtabular
endcenter








share|improve this question













share|improve this question




share|improve this question








edited Aug 30 at 0:10

























asked Aug 30 at 0:04









Leyla Alkan

1206




1206











  • Welcome to TeX.SE! Can the text font not be the same?
    – manooooh
    Aug 30 at 1:08
















  • Welcome to TeX.SE! Can the text font not be the same?
    – manooooh
    Aug 30 at 1:08















Welcome to TeX.SE! Can the text font not be the same?
– manooooh
Aug 30 at 1:08




Welcome to TeX.SE! Can the text font not be the same?
– manooooh
Aug 30 at 1:08










3 Answers
3






active

oldest

votes

















up vote
5
down vote



accepted










With no additional packages (I am assuming that Comic Sans is not your dream):



documentclassarticle


begindocument

begincenter
begintabular
multicolumn1c& $A$ &multicolumn1c NOT $A$ &multicolumn1c SUM\
%hline
cline2-4
$B$ & $P(A$ AND$,B)$ & $P($NOT $A$ AND$,B)$ & $P(B)$\
NOT $B$ &$P(A,$NOT$,B)$ &$P($NOT $A,$AND NOT$,B)$ & $P($NOT $B)$ \
%hline
cline2-4
& $P(A)$ & $P($NOT $A)$& $1$\
%hline
cline2-4
endtabular
endcenter

enddocument


enter image description here






share|improve this answer





























    up vote
    3
    down vote













    This is easy with blkarray:



    documentclassarticle
    usepackage[utf8]inputenc
    usepackage[T1]fontenc
    usepackagemathtools, blkarray

    begindocument

    [ everymathdisplaystylesetlengthBAextrarowheight2pt
    beginblockarraycccc
    & A & textNOT A & textSUM \
    BAhhline~---
    beginblock
    B & P(Atext ANDB) & P(textNOT Atext AND B) & P(B)\
    textNOT B &P(Atext NOT B) &P(textNOT Atext AND NOT B) & P(textNOT B) \
    BAhhline~
    & P(A) & P(textNOT A)& 1\
    BAhhline~---
    endblock
    endblockarray ]

    enddocument


    enter image description here






    share|improve this answer






















    • please use text for SUM.
      – corvus_192
      Aug 30 at 8:43










    • @corvus_192: Oh! yes, I forgot this cell. It's fixed. Thanks for pointing it!
      – Bernard
      Aug 30 at 9:08

















    up vote
    2
    down vote













    enter image description here



    Use multicolumn command to suppress vertical ruling of specific cells. If the table width is not as you want, try to modify the width provided in textwidth



    documentclassarticle
    usepackageamsmath
    renewcommandarraystretch1.7
    usepackageragged2e
    usepackagetabularx
    newcolumntypeC > arraybackslash Centering X
    usepackagebooktabs
    usepackagemakecell

    begindocument


    noindent
    begintable*

    centering
    begintabularxtextwidth >hsize=0.7hsizeC
    multicolumn1c & multicolumn1c$A$ & multicolumn1c$A^'$ & multicolumn1cSUM
    \
    Xcline2-40.2mm
    $B$ & $P(A text AND B)$ & $P(textNOT A text AND B)$ & $P(B)$
    \
    $B^'$ & $P(A text AND NOT B)$ & $P(textNOT A text AND NOT B)$ & $P($NOT $B)$
    \
    Xcline2-40.2mm
    & $P(A)$ & $P($NOT $A)$& $1$
    \
    Xcline2-40.2mm
    endtabularx

    endtable*


    enddocument





    share|improve this answer






















      Your Answer







      StackExchange.ready(function()
      var channelOptions =
      tags: "".split(" "),
      id: "85"
      ;
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function()
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled)
      StackExchange.using("snippets", function()
      createEditor();
      );

      else
      createEditor();

      );

      function createEditor()
      StackExchange.prepareEditor(
      heartbeatType: 'answer',
      convertImagesToLinks: false,
      noModals: false,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: null,
      bindNavPrevention: true,
      postfix: "",
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      );



      );













       

      draft saved


      draft discarded


















      StackExchange.ready(
      function ()
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f448422%2fhow-to-get-the-following-table%23new-answer', 'question_page');

      );

      Post as a guest






























      3 Answers
      3






      active

      oldest

      votes








      3 Answers
      3






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes








      up vote
      5
      down vote



      accepted










      With no additional packages (I am assuming that Comic Sans is not your dream):



      documentclassarticle


      begindocument

      begincenter
      begintabular
      multicolumn1c& $A$ &multicolumn1c NOT $A$ &multicolumn1c SUM\
      %hline
      cline2-4
      $B$ & $P(A$ AND$,B)$ & $P($NOT $A$ AND$,B)$ & $P(B)$\
      NOT $B$ &$P(A,$NOT$,B)$ &$P($NOT $A,$AND NOT$,B)$ & $P($NOT $B)$ \
      %hline
      cline2-4
      & $P(A)$ & $P($NOT $A)$& $1$\
      %hline
      cline2-4
      endtabular
      endcenter

      enddocument


      enter image description here






      share|improve this answer


























        up vote
        5
        down vote



        accepted










        With no additional packages (I am assuming that Comic Sans is not your dream):



        documentclassarticle


        begindocument

        begincenter
        begintabular
        multicolumn1c& $A$ &multicolumn1c NOT $A$ &multicolumn1c SUM\
        %hline
        cline2-4
        $B$ & $P(A$ AND$,B)$ & $P($NOT $A$ AND$,B)$ & $P(B)$\
        NOT $B$ &$P(A,$NOT$,B)$ &$P($NOT $A,$AND NOT$,B)$ & $P($NOT $B)$ \
        %hline
        cline2-4
        & $P(A)$ & $P($NOT $A)$& $1$\
        %hline
        cline2-4
        endtabular
        endcenter

        enddocument


        enter image description here






        share|improve this answer
























          up vote
          5
          down vote



          accepted







          up vote
          5
          down vote



          accepted






          With no additional packages (I am assuming that Comic Sans is not your dream):



          documentclassarticle


          begindocument

          begincenter
          begintabular
          multicolumn1c& $A$ &multicolumn1c NOT $A$ &multicolumn1c SUM\
          %hline
          cline2-4
          $B$ & $P(A$ AND$,B)$ & $P($NOT $A$ AND$,B)$ & $P(B)$\
          NOT $B$ &$P(A,$NOT$,B)$ &$P($NOT $A,$AND NOT$,B)$ & $P($NOT $B)$ \
          %hline
          cline2-4
          & $P(A)$ & $P($NOT $A)$& $1$\
          %hline
          cline2-4
          endtabular
          endcenter

          enddocument


          enter image description here






          share|improve this answer














          With no additional packages (I am assuming that Comic Sans is not your dream):



          documentclassarticle


          begindocument

          begincenter
          begintabular
          multicolumn1c& $A$ &multicolumn1c NOT $A$ &multicolumn1c SUM\
          %hline
          cline2-4
          $B$ & $P(A$ AND$,B)$ & $P($NOT $A$ AND$,B)$ & $P(B)$\
          NOT $B$ &$P(A,$NOT$,B)$ &$P($NOT $A,$AND NOT$,B)$ & $P($NOT $B)$ \
          %hline
          cline2-4
          & $P(A)$ & $P($NOT $A)$& $1$\
          %hline
          cline2-4
          endtabular
          endcenter

          enddocument


          enter image description here







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Aug 30 at 0:40

























          answered Aug 30 at 0:34









          Przemysław Scherwentke

          29.1k54393




          29.1k54393




















              up vote
              3
              down vote













              This is easy with blkarray:



              documentclassarticle
              usepackage[utf8]inputenc
              usepackage[T1]fontenc
              usepackagemathtools, blkarray

              begindocument

              [ everymathdisplaystylesetlengthBAextrarowheight2pt
              beginblockarraycccc
              & A & textNOT A & textSUM \
              BAhhline~---
              beginblock
              B & P(Atext ANDB) & P(textNOT Atext AND B) & P(B)\
              textNOT B &P(Atext NOT B) &P(textNOT Atext AND NOT B) & P(textNOT B) \
              BAhhline~
              & P(A) & P(textNOT A)& 1\
              BAhhline~---
              endblock
              endblockarray ]

              enddocument


              enter image description here






              share|improve this answer






















              • please use text for SUM.
                – corvus_192
                Aug 30 at 8:43










              • @corvus_192: Oh! yes, I forgot this cell. It's fixed. Thanks for pointing it!
                – Bernard
                Aug 30 at 9:08














              up vote
              3
              down vote













              This is easy with blkarray:



              documentclassarticle
              usepackage[utf8]inputenc
              usepackage[T1]fontenc
              usepackagemathtools, blkarray

              begindocument

              [ everymathdisplaystylesetlengthBAextrarowheight2pt
              beginblockarraycccc
              & A & textNOT A & textSUM \
              BAhhline~---
              beginblock
              B & P(Atext ANDB) & P(textNOT Atext AND B) & P(B)\
              textNOT B &P(Atext NOT B) &P(textNOT Atext AND NOT B) & P(textNOT B) \
              BAhhline~
              & P(A) & P(textNOT A)& 1\
              BAhhline~---
              endblock
              endblockarray ]

              enddocument


              enter image description here






              share|improve this answer






















              • please use text for SUM.
                – corvus_192
                Aug 30 at 8:43










              • @corvus_192: Oh! yes, I forgot this cell. It's fixed. Thanks for pointing it!
                – Bernard
                Aug 30 at 9:08












              up vote
              3
              down vote










              up vote
              3
              down vote









              This is easy with blkarray:



              documentclassarticle
              usepackage[utf8]inputenc
              usepackage[T1]fontenc
              usepackagemathtools, blkarray

              begindocument

              [ everymathdisplaystylesetlengthBAextrarowheight2pt
              beginblockarraycccc
              & A & textNOT A & textSUM \
              BAhhline~---
              beginblock
              B & P(Atext ANDB) & P(textNOT Atext AND B) & P(B)\
              textNOT B &P(Atext NOT B) &P(textNOT Atext AND NOT B) & P(textNOT B) \
              BAhhline~
              & P(A) & P(textNOT A)& 1\
              BAhhline~---
              endblock
              endblockarray ]

              enddocument


              enter image description here






              share|improve this answer














              This is easy with blkarray:



              documentclassarticle
              usepackage[utf8]inputenc
              usepackage[T1]fontenc
              usepackagemathtools, blkarray

              begindocument

              [ everymathdisplaystylesetlengthBAextrarowheight2pt
              beginblockarraycccc
              & A & textNOT A & textSUM \
              BAhhline~---
              beginblock
              B & P(Atext ANDB) & P(textNOT Atext AND B) & P(B)\
              textNOT B &P(Atext NOT B) &P(textNOT Atext AND NOT B) & P(textNOT B) \
              BAhhline~
              & P(A) & P(textNOT A)& 1\
              BAhhline~---
              endblock
              endblockarray ]

              enddocument


              enter image description here







              share|improve this answer














              share|improve this answer



              share|improve this answer








              edited Aug 30 at 9:07

























              answered Aug 30 at 0:27









              Bernard

              156k763189




              156k763189











              • please use text for SUM.
                – corvus_192
                Aug 30 at 8:43










              • @corvus_192: Oh! yes, I forgot this cell. It's fixed. Thanks for pointing it!
                – Bernard
                Aug 30 at 9:08
















              • please use text for SUM.
                – corvus_192
                Aug 30 at 8:43










              • @corvus_192: Oh! yes, I forgot this cell. It's fixed. Thanks for pointing it!
                – Bernard
                Aug 30 at 9:08















              please use text for SUM.
              – corvus_192
              Aug 30 at 8:43




              please use text for SUM.
              – corvus_192
              Aug 30 at 8:43












              @corvus_192: Oh! yes, I forgot this cell. It's fixed. Thanks for pointing it!
              – Bernard
              Aug 30 at 9:08




              @corvus_192: Oh! yes, I forgot this cell. It's fixed. Thanks for pointing it!
              – Bernard
              Aug 30 at 9:08










              up vote
              2
              down vote













              enter image description here



              Use multicolumn command to suppress vertical ruling of specific cells. If the table width is not as you want, try to modify the width provided in textwidth



              documentclassarticle
              usepackageamsmath
              renewcommandarraystretch1.7
              usepackageragged2e
              usepackagetabularx
              newcolumntypeC > arraybackslash Centering X
              usepackagebooktabs
              usepackagemakecell

              begindocument


              noindent
              begintable*

              centering
              begintabularxtextwidth >hsize=0.7hsizeC
              multicolumn1c & multicolumn1c$A$ & multicolumn1c$A^'$ & multicolumn1cSUM
              \
              Xcline2-40.2mm
              $B$ & $P(A text AND B)$ & $P(textNOT A text AND B)$ & $P(B)$
              \
              $B^'$ & $P(A text AND NOT B)$ & $P(textNOT A text AND NOT B)$ & $P($NOT $B)$
              \
              Xcline2-40.2mm
              & $P(A)$ & $P($NOT $A)$& $1$
              \
              Xcline2-40.2mm
              endtabularx

              endtable*


              enddocument





              share|improve this answer


























                up vote
                2
                down vote













                enter image description here



                Use multicolumn command to suppress vertical ruling of specific cells. If the table width is not as you want, try to modify the width provided in textwidth



                documentclassarticle
                usepackageamsmath
                renewcommandarraystretch1.7
                usepackageragged2e
                usepackagetabularx
                newcolumntypeC > arraybackslash Centering X
                usepackagebooktabs
                usepackagemakecell

                begindocument


                noindent
                begintable*

                centering
                begintabularxtextwidth >hsize=0.7hsizeC
                multicolumn1c & multicolumn1c$A$ & multicolumn1c$A^'$ & multicolumn1cSUM
                \
                Xcline2-40.2mm
                $B$ & $P(A text AND B)$ & $P(textNOT A text AND B)$ & $P(B)$
                \
                $B^'$ & $P(A text AND NOT B)$ & $P(textNOT A text AND NOT B)$ & $P($NOT $B)$
                \
                Xcline2-40.2mm
                & $P(A)$ & $P($NOT $A)$& $1$
                \
                Xcline2-40.2mm
                endtabularx

                endtable*


                enddocument





                share|improve this answer
























                  up vote
                  2
                  down vote










                  up vote
                  2
                  down vote









                  enter image description here



                  Use multicolumn command to suppress vertical ruling of specific cells. If the table width is not as you want, try to modify the width provided in textwidth



                  documentclassarticle
                  usepackageamsmath
                  renewcommandarraystretch1.7
                  usepackageragged2e
                  usepackagetabularx
                  newcolumntypeC > arraybackslash Centering X
                  usepackagebooktabs
                  usepackagemakecell

                  begindocument


                  noindent
                  begintable*

                  centering
                  begintabularxtextwidth >hsize=0.7hsizeC
                  multicolumn1c & multicolumn1c$A$ & multicolumn1c$A^'$ & multicolumn1cSUM
                  \
                  Xcline2-40.2mm
                  $B$ & $P(A text AND B)$ & $P(textNOT A text AND B)$ & $P(B)$
                  \
                  $B^'$ & $P(A text AND NOT B)$ & $P(textNOT A text AND NOT B)$ & $P($NOT $B)$
                  \
                  Xcline2-40.2mm
                  & $P(A)$ & $P($NOT $A)$& $1$
                  \
                  Xcline2-40.2mm
                  endtabularx

                  endtable*


                  enddocument





                  share|improve this answer














                  enter image description here



                  Use multicolumn command to suppress vertical ruling of specific cells. If the table width is not as you want, try to modify the width provided in textwidth



                  documentclassarticle
                  usepackageamsmath
                  renewcommandarraystretch1.7
                  usepackageragged2e
                  usepackagetabularx
                  newcolumntypeC > arraybackslash Centering X
                  usepackagebooktabs
                  usepackagemakecell

                  begindocument


                  noindent
                  begintable*

                  centering
                  begintabularxtextwidth >hsize=0.7hsizeC
                  multicolumn1c & multicolumn1c$A$ & multicolumn1c$A^'$ & multicolumn1cSUM
                  \
                  Xcline2-40.2mm
                  $B$ & $P(A text AND B)$ & $P(textNOT A text AND B)$ & $P(B)$
                  \
                  $B^'$ & $P(A text AND NOT B)$ & $P(textNOT A text AND NOT B)$ & $P($NOT $B)$
                  \
                  Xcline2-40.2mm
                  & $P(A)$ & $P($NOT $A)$& $1$
                  \
                  Xcline2-40.2mm
                  endtabularx

                  endtable*


                  enddocument






                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited Aug 30 at 1:00

























                  answered Aug 30 at 0:54









                  Al-Motasem Aldaoudeyeh

                  1,155211




                  1,155211



























                       

                      draft saved


                      draft discarded















































                       


                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function ()
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f448422%2fhow-to-get-the-following-table%23new-answer', 'question_page');

                      );

                      Post as a guest













































































                      Comments

                      Popular posts from this blog

                      Long meetings (6-7 hours a day): Being “babysat” by supervisor

                      Is the Concept of Multiple Fantasy Races Scientifically Flawed? [closed]

                      Confectionery