0
$\begingroup$

Does it make sense to draw a histogram where its x-variable is categorical? I know that normally categorical variables are represented with bar charts, but I am just wondering if in practice it is okay to assume my categorical x variable to be continuous and make a histogram out of it.

For example, if my x-variable stands for a "layer", which consists of the levels 1,2,3,...,12 (discrete), would it be okay, say, assume that layer is a continuous variable and draw a histogram and density curve based on my data, for my computational academic paper?

I don't want my paper to be rejected just because I drew a density and histogram of my discrete x-variable, and mentioned something about "the mode" of the histogram.

Thank you,

$\endgroup$
3
  • 1
    $\begingroup$ Are your data categorical or discrete? By discrete, I mean that the $11$ means $11$ somethings, one more then $10$ somethings but one less than $12$ somethings. $\endgroup$
    – Dave
    Sep 15, 2020 at 18:58
  • 2
    $\begingroup$ Technically, wrong to make a histogram for categorical x. Also possibly misleading because the separated bars in a bar chart do not suggest continuity, whereas the histogram bins do suggest continuity. // Consider pie charts for nominal categorical data (segments often ordered according to frequency/proportion) and bar charts for ordinal categorical data (bars in proper order). But there are instances where these choices may not be best. (For example with Likert-5 (strongly neg, somewhat neg, ... stongly pos) a pie chart with sectors in order can show whether neg feeling predominates).. $\endgroup$
    – BruceET
    Sep 15, 2020 at 18:59
  • $\begingroup$ I'd say my layer is discrete, since layer 2 is on the top of layer 1, layer 3 is on the top of layer 2, and so on. $\endgroup$
    – HDB
    Sep 15, 2020 at 19:42

0

Your Answer

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

Browse other questions tagged or ask your own question.