# How to visualize two small samples with different sizes?

As part of a psychology experiment, I surveyed 15 users. I separated them in two groups, those who have become smoke free, and those who are still smoking. These groups have different sizes (9 and 6).

I want to show graphically that the smoke free group reported higher values of the survey index. This is my current best attempt, with Google Sheets:

However, I think that a correct comparison should have the same number of data points. I guess I need some form of interpolation, but not sure how to proceed.

An alternative approach is using a bubble chart:

My questions:
1. Would you recommend a different chart?
2. Should I have the same number of data points? If yes, how to achieve that?

By downloading the Free Wolfram Engine for Developers you may use Wolfram Language. If you are using Python then use the Wolfram Client Library for Python to access the engine in Python.

You may use BoxWhiskerChart with Labeled to show the distribution of responses and label how may responses in each set.

I'll generate some responses for each of the two groups.

SeedRandom[123]
survey = MapThread[RandomVariate, {UniformDistribution /@ {{3, 5}, {2.5, 4}}, {6, 9}}]

{{3.91144, 4.95565, 4.88643, 4.92443, 3.6047, 3.93342},
{2.59246, 3.07847, 3.14476, 3.66812, 2.57289, 3.4424, 2.91698, 2.63533, 3.81488}}


Then plot with a number of observations label located at the "UpperFence" of each set.

BoxWhiskerChart[
Labeled[#, "Obs: " <> ToString@Length@#, "UpperFence"] & /@ survey,
ChartLabels -> {"Smoke free", "Smoking"},
ChartStyle -> {Orange, Purple},
GridLines -> {None, Automatic}]


Hope this helps.

How's a net? Where you colourize binary (e.g. orange = smoker, blue = none-smoker) and the distance to the midpoint of the circle shows how happy they are.

Find also a screenshot how to arrange the data (i.e. Excel)

• Thank you! This would not solve my problem because it does not provide a direct comparison of the two groups. The difference between the two samples is small, about 10%. – Michele Dorigatti Oct 18 '19 at 14:49