1 2 Previous Next 18 Replies Latest reply on May 12, 2011 5:24 AM by Srinivas Dronamraju

    How do create Calculation that sums up across whole Table? not that easy...

      This sounds simple, but unfortunately it's not. Or I am missing something.


      I want to calculate expected values in a contingency table, see http://en.wikipedia.org/wiki/Contingency_table. I.e. Each cell should be


      ((Row Total)*(Column Total)) / (Grand Total)


      The data is as such:


      Brand    Image
       Orange    A
      Apple    B
      Orange    B
      Apple    A
      Orange    A
      Lemon    A
      Apple    B
      Orange    B


      Resulting in the following contingency table:


          A    B    Grand Total
       Apple    1    2    3
      Lemon    1    0    1
      Orange    2    2    4
      Grand Total    4    4    8


      E.g. for cell Apple/A I would now like to have the value (4*3)/12 in the according cell, which is the expected frequency if the two dimensions were independently distributed. How could I achieve this? I am only able to define table calculations for Row Sums and Col Sums, but not for Total Sums.



        1 2 Previous Next