From: Barrie Stokes on
Hi John

How about this?

y1 = RandomReal[ NormalDistribution[ 0, 1 ] ]

y2 = RandomReal[ NormalDistribution[ 0, 1 ] ]

y3 = RandomReal[ NormalDistribution[ 0, 1 ] ]

y4 = RandomReal[ NormalDistribution[ 1, 1 ] ]

y5 = RandomReal[ NormalDistribution[ 1, 1 ] ]

y6 = RandomReal[ NormalDistribution[ 1, 1 ] ]

ListPlot[{{{1, y1}, {1, y2}, {1, y3}}, {{2, y4}, {2, y5}, {2,
y6}}}, PlotStyle -> {PointSize[ 0.02 ]}]

sample1 = Table[ {1, RandomReal[ NormalDistribution[ 0, 1 ] ]} , {20}]

sample2 = Table[ {2, RandomReal[ NormalDistribution[ 1, 1 ] ]} , {20}]

ListPlot[{sample1, sample2}, PlotStyle -> {PointSize[ 0.02 ]}]

Cheers

Barrie

>>> On 28/02/2010 at 8:52 pm, in message <201002280952.EAA25673(a)smc.vnet.net>, John
<jwa0(a)lehigh.edu> wrote:
> Mathematica 6, XP windows
>
> Help says ListPlot plots lists of points, but my attempts to plot the
> following two lists failed:
>
> ListPlot[{{{1,y1},{1,y2},{1,y3}},{{2,y4},{2,y5},{2,y6}}}]
>
> The second entries in each pair are simulated values of random
> variables having the normal distribution, with specified parameters.
>
> The plot would have instructional value because the students could
> compare different samples side by side.
>
> I would appreciate hearing from anyone who knows how to do this.
>
> John