Creating and indexing lists in Python

List is the simplest type of data structure in Python programming. A list is used to store a collection of elements of same type (numeric, string, etc.). In Python, a pair of brackets [] indicates the data object is a list type. For example, the following two statements create two lists, in which one is numeric and the other is of string type.

How to install Anaconda and start programming with Python?

Python is among the most popular programming language for data science nowadays, and getting started with Python is quite easy. You can just install e.g. a free platform like Anaconda, then you can get direct access to Python as well as most of its preinstalled modules (Numpy, pandas, matplotlib, etc.), its IDE (Spyder, etc) and its easygoing package management tools.

Using a function with a while loop in Python

A function in Python is a group of code statements wrapped together to perform specific tasks. After a function is defined, then it can be called by passing real values to its arguments and get the returning results. A while loop in Python is a group of conditional statements bundled in a statement beginning with keyword ‘while’, and the codes will run forever until the condition returns false. By including a user-defined function inside a while loop in Python, many iterative tasks can be fulfilled.

Calculating Type I Error and Type II Error in Hypothesis Testing using Python

In hypothesis testing, the possibility of the other side than the conclusion usually exists, and the analysis commits so-called Type I and Type II errors, with respect to the truth and the decision made upon the random sample and hypotheses. In particular, a Type I error measures the probability that a true Null hypothesis (H0) is incorrectly rejected, and a Type II error says the probability that a false H0 not being rejected, respectively.