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

Some exercises

I'm going to give you a little assignment in this section. If you open up MeanMedianExercise.ipynb file, there's some stuff you can play with. I want you to roll up your sleeves and actually try to do this.

In the file, we have some random e-commerce data. What this data represents is the total amount spent per transaction, and again, just like with our previous example, it's just a normal distribution of data. We can run that, and your homework is to go ahead and find the mean and median of this data using the NumPy package. Pretty much the easiest assignment you could possibly imagine. All the techniques you need are in the MeanMedianMode.ipynb file that we used earlier.

The point here is not really to challenge you, it's just to make you actually write some Python code and convince yourself that you can actually get a result and make something happen here. So, go ahead and play with that. If you want to play with it some more, feel free to play around with the data distribution here and see what effect you can have on the numbers. Try adding some outliers, kind of like we did with the income data. This is the way to learn this stuff: master the basics and the advance stuff will follow. Have at it, have fun.

Once your're ready, let's move forward to our next concept, standard deviation and variance.

主站蜘蛛池模板: 常山县| 晋中市| 启东市| 湖北省| 保德县| 陆良县| 阳城县| 尉氏县| 中山市| 大方县| 望江县| 婺源县| 宜昌市| 屏南县| 大埔县| 盐池县| 清水河县| 长沙县| 建阳市| 吴旗县| 永善县| 绍兴市| 富源县| 锡林浩特市| 锦屏县| 铁力市| 溧阳市| 桑日县| 仙游县| 汉中市| 南靖县| 武强县| 青州市| 延川县| 高淳县| 开平市| 墨玉县| 泰来县| 宜春市| 营口市| 义乌市|