I want to use wolframalpha to find the probability of a line y = a x + b
passes through the point [2,8]
, when a
and b
are determined by fair dice roll.
This does what i want:
Count[Flatten[Table[a 2 + b, {a,6},{b,6}]],8]/
Length[Flatten[Table[a 2 + b, {a,6},{b,6}]]]
, but I don't like the repetition. I'm not fully certain why following will not work:
Count[x, 8]/Length[x] /. x -> Flatten[Table[a 2 + b, {a, 6}, {b, 6}]]
Can i get around this and what is happening?