liveBook · Manning

Market share

As explained in Statistics Every Programmer Needs

Market share is the proportion of a market's total customers, sales, or usage attributable to a particular product or provider.

Market share is the proportion of a market attributable to a product or provider. In a multistate model, each provider’s share represents the probability that a randomly selected consumer subscribes to that provider during a given period. section 11.2.1

Represent the shares as a state-probability vector. For four carriers, the initial vector is [0.40, 0.35, 0.20, 0.05], and its entries sum to 1, corresponding to 100% of the market. A transition matrix describes the probability of remaining with a provider or switching to another between periods. section 11.2.1 section 11.2.2

Forecasting carrier shares

Using the carrier vector and transition matrix with NumPy, compute the next period as pi_1 = dot(pi_0, P). The resulting shares are [0.394, 0.329, 0.217, 0.060]. Applying the matrix again gives period-two shares of [0.39012, 0.31454, 0.22803, 0.06731]. Multiplying the matrix by itself first produces the same period-two result. section 11.2.2

>>> import numpy as np

>>> pi_0 = np.array([0.40, 0.35, 0.20, 0.05])

>>> P = np.array([
>>>     [0.85, 0.06, 0.07, 0.02],
>>>     [0.08, 0.80, 0.10, 0.02],
>>>     [0.10, 0.10, 0.75, 0.05],
>>>     [0.12, 0.10, 0.08, 0.70]
>>> ])

Use the NumPy listing to construct the initial market-share vector and transition matrix before calculating future distributions. section 11.2.2

How Statistics Every Programmer Needs covers it

How deep it goes
Explains vector and matrix representations, then computes one- and two-period forecasts without developing model estimation or validation.
Examples
Uses four fictional cellular carriers, an initial share vector, a transition matrix, and NumPy forecasts for two future periods.
What it assumes
Assumes basic probability and vectors, while introducing the market-share interpretation of state probabilities.
What you can do after
Apply it via NumPy to calculate future market-share distributions from an initial vector and transition matrix.
How it connects
Connects market share with Markov analysis, state probabilities, transition probabilities, and consumer switching.

Also explained in

Compare how 2 books explain market share →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Statistics Every Programmer Needs. The section links point to the parts of the book it draws on.