Follow Vamei review probability theory

Source: Internet
Author: User

Recently re-read a bit of probability theory, feel a lot of things are forgotten, but also into a variety of misunderstandings, hurriedly corrected back.

The main contents of probability theory include:

events, conditional probabilities, random variables, distribution functions of random variables, probability densities, union distributions, expectations, variances, covariance.

Summary of my own misunderstanding:

1. Events and Random variables

The first thing to make clear is that the sample space is the set of all possible events, which consist of all the basic events. The event is a set of basic time, is a subset of the sample space, the event is fixed, or the probability of the event is fixed (the priori probability that the Bayesian school joins is not considered first). A mapping of random variables, which is a mapping from events to real numbers, is a random variable that expresses the entire sample space, describes the possibility of various event combinations, and has various properties such as expected variance. So, events and random variables are completely different concepts, one static move, not confusing.

Give a chestnut, throw a dice once, the corresponding basic event is the dice appear 1 of the face 、...、 roll the dice appear 6. The basic events are dead, and their probabilities are also dead is 1/6. For a single dice experiment we can define a random variable x, which expresses the basic event with the real value of x, for example, x=1 indicates that a polygon 1,x=6 represents the occurrence of polygon 6.

So we're going to split up the events and random variables.

An important concept for random variables is the cumulative distribution function (cdf,cumlative distribution function), which is used to represent the probability distribution of random variables. Obviously cumulative distribution function is the limit of infinity is 1, in addition to the right continuous, non-descending and other special types.

As an example:

To do two coin toss experiments, the random variable X indicates the number of positive occurrences, obviously, x=0,1,2, the probability is: 0.25,0.5,0.25. Its CDF is as follows:

The code is as follows:

>>> x = [-1, 0, 0, 1, 1, 2, 2, 3]>>> y = [0, 0, 0.25, 0.25, 0.75, 0.75, 1, 1]>>> fig = Plt.figu Re () >>> ax = plt.subplot () >>> ax = plt.subplot (111) >>> Ax.plot (x, y) [< Matplotlib.lines.Line2D object at 0x10b5b4e10>]>>> ax.set_ylim ([ -0.1, 1.1]) ( -0.1, 1.1) >>> Ax.set _title ("CDF plot") <matplotlib.text.text object at 0x10b59e950>>>> plt.show ()

1.2 Errors in the probability of a piece of article

In fact 1.1 understood, 1.2 naturally understood. Is the difference between the conditional probabilities of random events and the conditional probabilities of random variables. First, both can calculate the conditional probability, or the nature of the conditional probability mountain is calculated by the event. My understanding is that a random variable is a conditional probability after a numeric conversion, and if given a value, the two are equivalent. But random variables are random and dynamic, so there will be conditional probability distributions and so on. So the two are still different, still is a static move.

2. About covariance

Covariance is a relationship that describes the relationships between multiple random variables. If the two random variables are independent of each other, then their covariance or correlation coefficients are 0 and the inverse is not true.

Consider that we have a sample of M, and the characteristic number of each sample is N. Then we can treat n features as n random variables. Each random variable has a real value of m as its observed value, so we can calculate the mean, variance. The covariance between the 22 features can then be calculated. And these covariance is enough to be the covariance matrix of the entire sample set. Covariance matrices are useful, especially when used in Gaussian distribution models.

Not finished, to be continued.

Follow Vamei review probability theory

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.