Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
hariprasadqv
Creator III
Creator III

Bell Curve Plotting

Hi All,

Any help regarding my issue would be very much appreciated.

I need to draw a bell curve based on the fallowing data.

Country     Growth

US             1.2

GB              3.0

FR              2.6

JP               1.9

BR               2.9

CA               0.9

GM               2.1

UAE             1.1

MA               3.2

Thanks

8 Replies
swuehl
MVP
MVP

How should this look like?

I mean, your x-axis should be Country, right?

But that's not an appropriate axis for bell curve fitting, since there is no natural ordering in the dimension values, nor a numeric spacing.

Think about how the curve will change when you reorder the dimension values.

hic
Former Employee
Former Employee

I can only chime in to Stefan's answer. The x-axis needs to be numeric and the y-axis usually gives the frequency for that specific value or interval.

See more on Recipe for a Histogram

HIC

hariprasadqv
Creator III
Creator III
Author

Thanks for the Reply Henric.

I got your point. could you please help me to draw bell curve from the data. Like interval on one axis and growth on other axis. Any posibility to plot a bell curve on the data would be grate for me.

Thanks

hariprasadqv
Creator III
Creator III
Author

Thanks swuehl,

Any guess after data transformations from source data like Interval creation.

Thanks

hic
Former Employee
Former Employee

It is not possible, given the posted data. Stefan's first question is still relevant. How would such a graph look? The only way I can think of is the following. And then I cannot fit a bell curve in here...

HIC

Image1.png

swuehl
MVP
MVP

Only way to create a histogram that comes to mind is to classify the Growth rates:

Create a bar chart with calculated dimension

=class(Growth, 0.25)

and expression

=count(distinct Country)

The number 0.25 for bucket size is quite arbitrary, you can play with it.

Given the number of samples and the values reported, your histogram will not really look like a bell curve.

I think Henric has described in his blog post how to add a bell curve reference line to this chart.

hariprasadqv
Creator III
Creator III
Author

Thanks for the reply henric. I will try swuehl way.

jonathandienst
Partner - Champion III
Partner - Champion III

You could do this in a combo chart

  • Define a variable vClass, set to the required chart resolution (eg 0.1)
  • Dimension: Class(Growth, vClass)
  • Expression: NORMDIST(Class(Growth, vClass), Avg(TOTAL Growth), Stdev(TOTAL Growth), 0)
  • Set x-axis to continuous

I am not sure this is what you want, but it does produce a bell-curve based on the growth numbers...

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein