Workshop 1, Stats for AI
1 General Directions for each workshop
You have to work on Google Colab for all your workshops. In Google Colab, you MUST LOGIN with your @tec.mx account and then create a google colab document for each workshop.
You must share each Colab document (workshop) with the following account:
- cdorante@tec.mx
You must give Edit privileges to these accounts.
Name your Notebook as “W1-StatsAI-YourFirstName-YourLastname”.
In your Workshop Notebook you have to respond to challenges/excercise. For each challenge, write down the directions before your solution.
- It is STRONGLY RECOMMENDED that you write your OWN NOTES as if this were your personal notebook to study for the EXAM. Your own workshop/notebook will be very helpful for your further study.
Once you finish your workshop, make sure that you RUN ALL CHUNKS.
You have to submit to Canvas the web link of your Google Colab workshop.
The material related to this workshop is covered in Chapters 1, 2 and 3 of my ebook. You can find my ebook at:
2 CHALLENGE 1
Import in your Colab a dataset from the World Bank site about the GDP per capita for all countries for the year 2024. (Ask Gemini for the code).
Once you download it, review the dataset and decide whether you need to do any data treatment/transformation. Make sure that you only have countries (not regions).
- Do you need to do any data treatment/transformation? Explain why yes or why not. If yes, do the data treatments/transformations.
Applying what you learned about descriptive statistics, do the following:
In the world what is the typical GDP per-capita ? justify which measure(s) you used and explain the results with your words
How much (on average) the GDP per-capita varies across the countries? Justify which measure(s) you used and explain the results with your words
In terms of productivity, what can you say about the gaps that exist between the rich and the poor countries? Justify your calculations and explain with your words
3 CHALLENGE 2
Import daily quotations of the Bitcoin from Jan 1, 2017 to Aug 11, 2025. You can use the yfinance library.
Once you download it, review the dataset and decide whether you need to do any initial data treatment/transformation.
Applying what you learned about descriptive statistics, do the following:
- How much % simple return (on average) an investor have gained in Bitcoin daily considering the whole period.
Do any data transformation you need, and explain why and how you did so.
How much variation (on average) in % simple return an investor have made in Bitcoin considering the whole period.
Do a histogram of daily simple returns and interpret it with your words with a perspective of an investor.
(optional, extra points) Using your daily dataset, generate a monthly dataset with closing quotations (price at the end of the month) for Bitcoin, and respond to the previous 3 questions using monthly quotations. Compare your results with daily data. If you are planning to invest in Bitcoin, which responses you would pay more attention? Justify your answers