Here is something that might work for you. I tried to reuse as much as possible you original code.
zar1 := Random[Integer, {1, 6}];
zar2 := Random[Integer, {1, 6}];
j1j2 := Module[{c = 0, j1 = 0, j2 = 0, i},
For[i = 0, i < 10000, i++,
While[zar1 + zar2 != 11, c = c + 1]
If[Mod[c, 2] == 0, j2 = j2 + 1, j1 = j1 + 1]];
{j1, j2}]
SeedRandom[0];
DiscretePlot[j1j2, {i, 1, 100}, Filling -> None,
PlotStyle -> {AbsolutePointSize[6]}]
(sorry I could not find the option to have two colors for j1
and j2
).
Btw, as $j1+j2=1000$ you may want to plot just one of them. Here is j1:
DiscretePlot[First@j1j2, {i, 1, 100}, Filling -> None,
PlotStyle -> {AbsolutePointSize[6]}]
If you need the vector of results for other purposes you can obtain is like this:
SeedRandom[0];
list = Table[j1j2, {i, 1, 100}];
list1 = Table[{i, First@list[[i]]}, {i, 1, 100}];
list2 = Table[{i, Last@list[[i]]}, {i, 1, 100}];
ListPlot[{list1, list2}, PlotStyle -> {AbsolutePointSize[6]}]
zar1
andzar2
? $\endgroup$