A random variable X is said to have a geometric distribution if its probability distribution can be written as follows, where the parameter p is a constant lying between 0 and 1, and k takes on the values 1, 2, 3, … It is clear that Px(k) is nonnegative, as indicated here.
The geometric distribution is useful in the following situation. Suppose an expertiment is performed that leads to a sequence of independent Bernoulli random variables, each with parameters p; that is, P{Xi = 1} = p and P{Xi = 0} = 1 - p for all i. The random variable X, which is the number of trials occurring until the first Bernoulli random variable takes on the value 1, has a geometric distribution with parameter p.