python 描述性统计_Python中的基本统计:描述性统计

论坛 期权论坛     
选择匿名的用户   2021-5-28 02:16   29   0
<div style="font-size: 16px;">
<p>python 描述性统计</p>
<div>
  <p>The field of statistics is often misunderstood, but it plays an essential role in our everyday lives. Statistics, done correctly, allows us to extract knowledge from the vague, complex, and difficult real world. Wielded incorrectly, statistics can be used to harm and mislead. A clear understanding of statistics and the meanings of various statistical measures is important to distinguishing between truth and misdirection.</p>
  <p> 统计领域经常被误解,但在我们的日常生活中起着至关重要的作用。 正确完成的统计数据使我们能够从模糊,复杂和困难的现实世界中提取知识。 错误地使用统计信息可能会造成伤害和误导。 清楚地了解统计数据和各种统计方法的含义对于区分真相和误导很重要。 </p>
  <p>We will cover the following in this article:</p>
  <p> 我们将在本文中介绍以下内容: </p>
  <ul><li>defining statistics</li><li>descriptive statistics
    <ul><li>measures of central tendency</li><li>measures of spread</li></ul> </li></ul>
  <ul><li> 定义统计 </li><li> 描述性统计
    <ul><li> 集中趋势的量度 </li><li> 传播措施 </li></ul> </li></ul>
  <h2> <span style="font-weight: bold;">先决条件:</span> <span style="font-weight: bold;">(</span>Prerequisites:<span style="font-weight: bold;">)</span></h2>
  <p>This article assumes no prior knowledge of statistics, but does require at least a general knowledge of Python. If you are uncomfortable with <a class="external" href="https://www.python-tutorial.net/python-loops/" rel="noopener noreferrer" target="_blank"><code>for</code> loops</a> and <a class="external" href="https://www.python-tutorial.net/python-lists/" rel="noopener noreferrer" target="_blank">lists</a>, I recommend covering them briefly before progressing.</p>
  <p> 本文假定您没有统计学的先验知识,但至少需要具备Python的一般知识。 如果您对<a class="external" href="https://www.python-tutorial.net/python-loops/" rel="noopener noreferrer" target="_blank"><code>for</code>循环</a>和<a class="external" href="https://www.python-tutorial.net/python-lists/" rel="noopener noreferrer" target="_blank">列表不满意</a> ,建议您在进行操作之前简要介绍一下它们。 </p>
  <h2> <span style="font-weight: bold;">载入我们的数据</span> <span style="font-weight: bold;">(</span>Loading in our data<span style="font-weight: bold;">)</span></h2>
  <p>We will root our discussion of statistics in real-world data, taken from Kaggle’s <a class="external" href="https://www.kaggle.com/zynicide/wine-reviews/data" rel="noopener noreferrer" target="_blank">Wine Reviews</a> data set. The data itself comes from a scraper that scoured the <a class="external" href="https://www.winemag.com/" rel="noopener noreferrer" target="_blank">Wine Enthusiast site</a>.</p>
  <p> 我们将对统计数据的讨论植根于来自Kaggle的<a class="external" href="https://www.kaggle.com/zynicide/wine-reviews/data" rel="noopener noreferrer" target="_blank">Wine Reviews</a>数据集的真实数据。 数据本身来自刮擦<a class="external" href="https://www.winemag.com/" rel="noopener noreferrer" target="_blank">酒爱好者网站</a>的刮板。 </p>
  <p>For the sake of this article, let’s say that you are a sommelier-in-training, a new wine taster. You found this interesting data set on wines, and you would like to compare and contrast different wines. You’ll use statistics to describe the wines in the data set and derive some insights for yourself. Perhaps we can start our training with a cheap set of wines, or the most highly rated ones?</p>
  <p> 就本文而言,假设您是一位培训侍酒师,是一名新的葡萄酒品尝师。 您找到了有关葡萄酒的有趣数据集,并且想要比较和对比不同的葡萄酒。 您将使用统计数据来描述数据集中的葡萄酒,并为自己得出一些见解。 也许我们可以从便宜的葡萄酒或评级最高的葡萄酒开始我们的培训? </p>
  <p>The code below loads in the data set <code>wine-data.csv</code> into a variable <code>wines</code> as list of lists. We’ll perfrom statistics on <code>wines</code> throughout the article. You can use this code to follow along on your own computer.</p>
  <p> 下面的代码将数据集<code>wine-data.csv</code>装入列表中的变量<code>wines</code>中。 在整篇文章中,我们将对<code>wines</code>进行统计。 您可以使用此代码在自己的计算机上继续学习。 </p>
  <pre class="blockcode"><code class="language-python">import csv
with open(&#34;wine-data.csv&#34;, &#34;r&#34;, encoding&#61;&#34;latin-1&#34;) as f:
    wines &#61; list(csv.reader(f))
</code><code class="language-python">import csv
with open(&#34;wine-data.csv&#34;, &#34;r&#34;, encoding&#61;&#34;latin-1&#34;) as f:
    wines &#61; list(csv.reader(f))
</code> </pre>
  <p>Let’s have a brief look at the first five rows of the data in table, so we can see what kinds of values we’re working with.</p>
  <p> 让我们简要看一下表中数据的前五行,这样我们就可以看到我们正在使用哪种类型的值。 </p>
  <table><thead><tr><th>index</th><th> 指数 </th><th>country</th><th> 国家 </th><th>description</th><th> 描
分享到 :
0 人收藏
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

积分:3875789
帖子:775174
精华:0
期权论坛 期权论坛
发布
内容

下载期权论坛手机APP