官术网_书友最值得收藏!

Classical inference for means

We'll continue along a similar line to the previous section, in discussing classical statistical methods, but now in a new context. This section focuses on the mean of data that is quantitative, and not necessarily binary. We will demonstrate how to construct confidence intervals for the population mean, as well as several statistical tests that we can perform. Bear in mind throughout this section that we want to infer from a sample mean properties about a theoretical, unseen, yet fixed, population mean. We also want to compare the means of multiple populations, so as to determine whether they are the same or not.

When we assume that the population is a normal distribution, otherwise known as a classic bell curve, then we may use confidence intervals constructed using the t-distribution. These confidence intervals assume a normal distribution but tend to work well for large sample sizes even if the data is not normally distributed. In other words, these intervals tend to be robust. Unfortunately, statsmodels does not have a stable function with an easy user interface for competing these confidence intervals; however, there is a function, called _tconfint_generic(), that can compute them. You need to supply a lot of what this function needs to compute the confidence interval yourself. This means supplying the sample mean, the standard error of the mean, and the degrees of freedom, as shown in the following diagram:

As this looks like an unstable function, this procedure could change in future versions of statsmodels.

主站蜘蛛池模板: 屏东县| 阿城市| 星子县| 阳城县| 新蔡县| 平塘县| 军事| 天长市| 巩义市| 柳江县| 拉孜县| 都安| 外汇| 金平| 广元市| 毕节市| 六枝特区| 临朐县| 罗源县| 望都县| 吴旗县| 永平县| 济南市| 突泉县| 韩城市| 含山县| 泽库县| 宁津县| 白水县| 全南县| 安塞县| 长宁区| 镇赉县| 宜宾县| 沧源| 德兴市| 略阳县| 乌兰察布市| 托克逊县| 来宾市| 临夏县|