Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Introduction to Data Analysis

PyCon APAC 2017 presentation by Akira Nonaka

  • Be the first to comment

  • Be the first to like this

Introduction to Data Analysis

  1. 1. Introduction to the data analysis using python Akira Nonaka XOXZO
  2. 2. Who am I ? • XOXZO Evangelist • A Flying Python Programmer
  3. 3. About XOXZO • Provide SMS, Telephony API • No office • Everybody works remotely
  4. 4. Ten people Six countries Nine cities
  5. 5. Outline 1. Tools 2. Domain knowledge 3. Value of data analysis
  6. 6. Tools • Python • numpy • pandas • matplotlib • Jupyter notebook
  7. 7. Why horse racing data? • Over 30 years official data. • Clean data. No need for scraping. • Some chances of making money?
  8. 8. Let’s take a look at running speed
  9. 9. Speed • Faster horse wins the race • Distance and Time • Regression analysis (linear model)
  10. 10. • Horses run about 60km/h. • I want to compare the speed of horse A runs 1km and horse B runs 2km
  11. 11. Is the relationship linear?
  12. 12. Hypothesis • They must get tired if run long distance. • Regression analysis with quadratic model.
  13. 13. quadratic coefficient is negative convex upwards
  14. 14. Check other years
  15. 15. Expert advice • Every racecourse has different shape, straight line length and corner radius, etc. • It is not right to compare the data of various racecourses together.
  16. 16. Analysis by racecourse First off from Tokyo Racecourse
  17. 17. Convex shape 2014 2015 Convex downward 11 14 Convex upward 8 5
  18. 18. Tokyo Racecourse
  19. 19. Kyoto Racecourse
  20. 20. Hanshin Racecourse
  21. 21. Nakayama Racecourse
  22. 22. It is almost meaningless to compare the speed if the racecourse/distance is different
  23. 23. Lessons learned •Fatigue is not significant factor in horse racing. •Knowing the target domain is very important.
  24. 24. ROI
  25. 25. JRA Pay back Japanese horse racing system
  26. 26. Human predictions are reasonably accurate
  27. 27. Win Fav Win Rate 1 32.69 2 18.85 3 13.22 4 9.41 5 7.08 6 5.45 7 3.93 8 2.86 9 2.12 10 1.45
  28. 28. Public betting favorites win approximately 33 percent of all races and finish second 53 percent of the time. Second choices win approximately 21 percent of all races and finish second 42 percent of the time. So the top two choices win 54 percent of the races and finish second 74 percent of the time. You might even want to consider the fact that third choices win approximately 14 percent of all races run over the course of a year. http://www.predictem.com/horse/profit.php
  29. 29. Strategy • We humans sometime put too much emphasis on certain factors and ignore others. • That is where data analysis can make a difference.
  30. 30. Strategy X
  31. 31. Accumulated Payback Sequence of tickets bought from Jan.1 - Dec. 31
  32. 32. Lessons learned •Find under evaluated horses. •Win rate of strategy X is 8.8%.
  33. 33. Next Goal • Use machine learning to tune parameters of strategy X

×