2
$\begingroup$

Sorry for the unspecific title, but my lack of a way to accurately describe the problem is part an parcel of the problem itself. I'll try and demonstrate clearly through example, as I'm not confident in my describe the problem clearly.

In a very simplified example, let's say I have a company which ships some products to 4 countries.

raw

Representing how those products are distributed countrywise, I might produce a table like so:

summary

However it seems there are 2 perfectly valid ways to describe a "total". I could say 14, in that there are 14 products unique products sold per country.

Or I could say 8, in that there are 8 different products sold worldwide.

My problem is that both are useful, valid numbers for different purposes. While perhaps the second is the more obvious, intuitive answer for what "total" would mean here, it's not hard to imagine why I might want to know the number 14: Let's say I must register a product with a made up "European fruit registry". To know how many of those registrations I'd want to make, the answer would be 14.

What is a clear, unambiguous way to present what the numbers 14 and 8 are to this data?

My actual data involves 1000s of rows and 10s of columns

$\endgroup$

1 Answer 1

2
$\begingroup$

A good way to discuss this would be to talk about a frequency table with interesting marginal frequencies. Your overall table looks like this:

          Product
Country    Apple Banana Melon Orange Peach Pear Plum Pomegranate
  Austria      1      1     0      1     0    1    1           0
  Belgium      1      0     0      0     0    1    0           1
  Bulgaria     1      0     0      0     0    1    0           0
  Croatia      1      0     1      1     1    0    0           0

A potentially useful way to discuss your 14 is that there are 14 unique Product-Country combinations. You can also discuss the frequencies of the margins, which is to say how frequent are the categories in each of the two dimensions without concern for the other dimension. Along the Product dimension, the marginal frequencies are:

Product
      Apple      Banana       Melon      Orange       Peach        Pear        Plum Pomegranate 
          4           1           1           2           1           3           1           1 

For this, I would say there are 8 unique Products where the most frequently appearing products are apples, pears, and oranges. You already have this for the Country dimension:

Country
 Austria  Belgium Bulgaria  Croatia 
       5        3        2        4 

There are 4 unique Countries, and Austria has the most diverse fruit, followed by Croatia.

To make it clear, I would present the results alongside the appropriate tables.

$\endgroup$
3
  • $\begingroup$ In my source data a frequency table like the above would be a little impenetrable; the dataset is a little too large to comprehend with all the raw data presented (akin to 1000s of fruit in 10s of countries). I've pulled out some summaries to give an "overall feel" of the most important aspects of the data. I've also included a table much the above with a list of all countries sold for each product (to save width from 0s), just in case anyone wants to inspect specific products in more detail; so it's good to know a stranger on this forum had the same intuition as me in that regard. $\endgroup$
    – Some_Guy
    Commented Jan 4, 2017 at 9:31
  • $\begingroup$ Thanks for the pointer about marginal frequencies, and the phrasing of unique product country combinations, that's given me some interesting reading and a good direction to go in. $\endgroup$
    – Some_Guy
    Commented Jan 4, 2017 at 9:32
  • $\begingroup$ With the info on the data scale and if countries are really countries, you might consider plotting the marginal frequencies on a choropleth map with color intensity as frequency. If they aren't countries, you might consider a spineplot where you plot the "countries" against the fraction of total "fruit". If the fruit can be further categorized, you can incorporate that into a spineplot as well. $\endgroup$
    – Ashe
    Commented Jan 4, 2017 at 14:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.