# Basic Statistics – III – Introduction to Probability

Probability is a concept which is simple but powerful if applied correctly. A Very Simple example is that when there is coin tossed up,there are two outcomes possible. HEAD and Tail. If the coin has no bias, both the out comes are equally possible. We say that there is a possibility of 50% (0.5) each. Let us extend this to another commonly used game. If we throw a dice, there is a possibility of one out of the six outcomes. The dice will have 6 sides with numbers 1-6 on each side. Here the Probability is 1/6. Meaning each side has a 16.666% (0.01666) chances. In both these cases, assume that each outcome is an event, and  chance of occurrence is called probability.
There are many definitions to Probability.
The simplest is that “The measure of likelihood of occurrences“.The classical definition of probability is stated as below.
If there are “n” Exhaustive, Mutually exclusive and equally likely events, and “m” of them are favorable to an event “E” then the probability of occurrence of event “E”, denoted by Pr[E] is

Pr[E] = m/n
Here N need to fulfill 3 conditions 1 – Mutually Exclusive (The events are Mutually Exclusive if there is no possibility of them occurring together. Ex : Head and Tail of a same coin.),  2- Collectively Exhaustive (All the possible events are to be taken into account. ex: in the coin it is 2 ) and 3 – Equally Likely ( there shall not be any bias towards any event.)
Statistical (Empirical) definition of Probability:
If an experiment is repeated many times, under identical conditions, then the limit of the ratio of number of times that an event happens(m) to the total number of trials(n), as the umber of trials increases indefinitely, is called as probability of happening of the event.

# Basic Statistics – II What is a Variable and What are variable types

Variable is a characteristic, number, or quantity that increases or decreases over time, or takes different values in different situations. The variables are the basic units used in statistics for measuring , collecting and analyzing. Variables can be classified in to different categories depending on the usage at the point of analysis. The different variable types are

Dependent and Independent Variable types

An independent Variable can take any value and can be controlled and measured. These are the inputs used for the study. These are also called factors.
A Dependent Variable cannot be controlled. it can only be measured. these are generally output of the changes done to the independent variables. The value of the dependent variable is dependent on the relation on the independent variable. These are called as responses.
It is notable that the dependent and independent variables are not fixed. a dependent variable in one experiment or study may become factor in a different experiment or study.
For Example, The heat generated is dependent on the amount of fuel burnt. (in this case, heat is a dependent variable and amount of fuel is an independent variable.
In a different experiment, the time taken for completely evaporate a substance is dependent on the amount of heat supplied. in this case, the time taken is the dependent variable and amount of heat is an independent variable. It is notable here that amount of heat is dependent in one experinment and independent in another experiment.

Qualitative and Quantitative Variable types

Variables are also classified according to the type of the data they represent. This classification depends on the type of the value associated with the variable.
A Qualitative variable describes the characters in a non numerical form. They are also called as categorical variables. Examples of the values which a categorical variable can take are Good, Bad, Red, Blue, Light, heavy, etc. The variables are result, color, weight etc. This is also called as nominal variable.
A Quantitative variable has a numerical value associated with it. This would be a counted or a measured value. These are also called as Numerical variables. Examples of the values a variable are in numbers, 0, -1, 1,2 etc. the variables are height, weight etc.
Notable that the same variable can be a qualitative or quantitative depending upon the value it takes. for example, if height is give a measured value such as 1.72 Meters, height is a quantitative variable. If the same height is expressed in a comparative value such as tall, short, height is a Qualitative Variable.

Discrete and Continuous Variables.

A discrete variable is something which is an output of counting. This can take only a set of values including negative and fractional values. Examples for a discrete variable are Number of people, charge on electron, etc…. . As a thumb rule, if there a prefix “number of” to the variable, it can be treated as a discrete variable.
A continuous variable can take any value within a specified range. This is generally a measured value. examples of continuous variables are speed, height, distance etc.
Discrete and continuous variables are subset of Numerical variable types

Binomial, Nominal and Ordinal Variables.

A binomial variable can take only two possible values. There is no third option available. For example, result of a test (pass or Fail), Result of tossing a coin (head or tail) etc
A Nominal variable can take several un-ordered values. Examples such as color red, blue, green), Type of bank account( savings, checking etc).
An ordinal variable can have any of the several ordered values. There is clear distinction between the order of the values which are assigned example such as height (tall, short), or response in a survey of satisfaction (excellent, good, poor, etc)
Binomial, Nominal and Ordinal variables are subset of the Qualitative variable types