My wife is presenting a study at a conference poster session. She has a correlation of sorts [1] where kids' self-assessment of asthma ("I felt a lot better" or "I felt a little better or not better") matches doctors' assessments (0 to 6, low numbers are better). And we need a visual for the poster.
I'd have thought that a correlation graph would be the way to go, but the x- and y-values are both on discrete scales, so if you plot them, (1) there is no cloud of values to see and (2) there is no obvious trend.
Here are the buckets (value + count of occurrences) for people who felt a lot better:
>>> print(a_lot_better)
{0: 66, 1: 9, 2: 3, 3: 2}
And here are buckets for people who felt a little better or not better:
>>> print(a_little_better)
{0: 79, 1: 31, 2: 5, 3: 6, 6: 1}
If you sum up the numbers like this:
# python
def print_dict(d):
total = float(sum(d.values()))
composite = 0.0
for k, v in sorted(d.iteritems()) #def test_auth(self):
# logger.debug("Calling search")
# data_args = {"auth_token": self.auth_token, "extra_arg": "asd"}
# response = self.client.call_url("profile_auth", data=data_args)
# #logger.debug("response: {0}".format(response.reason))
# self.assertEqual(response.status_code, 200):
print("{0}: {1}".format(k, v / total))
composite += (k * v) / total
return composite
You get this:
>>> print_dict(a_lot_better)
0: 0.825
1: 0.1125
2: 0.0375
3: 0.025
0.2625
>>> print_dict(a_little_better)
0: 0.647540983607
1: 0.254098360656
2: 0.0409836065574
3: 0.0491803278689
6: 0.00819672131148
0.5327868852459017
And that is more obviously different, but I don't know how to present this visually (assuming even that this is a legitimate summary).
How should we present this data to be visually obvious that there is an interesting and significant relationship?
[1] As broadly understood by a statistics-civilian.