Any Formula To Find Sample Space?

The formula used in finding out the sample space of any experiment depends upon the number of outcomes and the way to get each outcome. For example, if a dice is thrown we have probable six outcomes as:

S = {1,2,3,4,5,6}

Or if in a bag consisting of 3 green and 4 red balls, two balls are drawn then the total ways in which two balls can be drawn =

So, the use of a formula depend on the type of problem we had.

**
**