Variable
P. K. MUTETI
[email protected]
P.K Muteti 1
Definition
It is a characteristic that takes on different values in different persons, objects,
places, or things.
A characteristic used to describe people, objects or phenomena.
P.K Muteti 2
Example
1. The ages of patients seen in Orthopaedic and trauma clinic.
2. Heart rate.
3. The heights of adult males.
4. the weights of preschool children.
Types of variables
I. Quantitative variable - a variable based on quantitative data. (assume numerical
value). Variable that can be measured in the actual sense. They convey information
regarding amounts.
Types.
1. Discrete variable - Variables which assume a finite or countable number of
possible values. This can only take whole number. (e.g., gender (male/female),
college class etc.
2. Continuous variable - a variable that can take on many different values. This can
take any value e.g. length, day etc. Variables which assume an infinite number of
possible values.
P.K Muteti 4
Cont
II. Qualitative variable. A variable based on categorical data. (non numerical
values). They cannot be measured in the actual sense
Types.
1. Ordinal variable. Is a categorical, statistical data type where the variables have
natural, ordered categories eg. Colour of iris of the eye.
2. Nominal variable. a categorical variable is a variable that can take on one of a
limited, and usually fixed, number of possible values,. Eg Gender. Male /
Female
P.K Muteti 5
Types of variables and scales of measurement
P.K Muteti 6
Other variables
1. Independent variable - A variable that is manipulated, measured, or selected by
the researcher as an antecedent condition to an observed behavior.
2. Dependent variable - A variable that is not under the experimenter's control. It is
the variable that is observed and measured in response to the independent.
variable.
3. Random variable - A variable whose values are determined by chance.
P.K Muteti 7
Quantitative and qualitative variables
Quantitative variables Qualitative variables
1. Can be measured eg. Ages, Heights, 1. Cannot be measured but observed.
weights of adult males. Eg. Gender groups, Hair colour
2. Reported in numerical terms. 2. Reported in non numerical terms.
P.K Muteti 8
Cont
Discrete variable Continuous variable
Take on countable and distinct values, Take on any value within a data set.
finite values, includes whole, concrete That may or may not be whole
numbers. Eg. (5, 10, 15, and so on). numbers. May or may not have
Example: - The number of daily decimals
admissions to a general hospital. For Example: - Height, weight, skull
Number of students in a class. circumference. Length of a limb etc
P.K Muteti 9
Cont
Nominal variables Ordinal variables
That can take on one of a limited, and Are categorical variables with ordered
usually fixed, number of possible possible values. Are ranked or ordered
values. Category without natural order. according to some criterion.
Example: Gender. Male - female . Example: Education level – Primary,
Marital status. Married – single – secondary, tertialy. Blood pressure
divorced (high-good-low). Grades (Excellent, Very
Blood type. A, B,AB,O. Eye color. good, good, fail)
P.K Muteti 10
Cont
Nominal variables Ordinal variables
Employment status. Employed Income level (“less than 50K”, “50K-
Unemployed 100K”, “over 100K”),
Names of people Satisfaction rating (“extremely dislike”,
“dislike”, “neutral”, “like”, “extremely
like”).
P.K Muteti 11
Scales of measurement
Definition
Scales of measurement is how variables are defined and categorised.
Primary / Common scales of measurement
1. Nominal scale
2. Ordinal scale
3. Interval scale
4. Ratio scale.
Types of scales of measurement
1. Nominal scale: Consists of two or more named categories (classes) which are
qualitatively different from each other.
Example
1.Sex: Male (1) Female (2)
2.Marital status: 1. Married 2. Single 3. Divorced 4. Widowed. In a study code 1 will
be used to identify male and 2 to identify female. (used to identify and classify
objects)
P.K Muteti 14
Cont
2. Ordinal scale: Is data type where variables are in order or rank
but without a degree of difference between categories
Categories are ranked in increasing or decreasing order.
Example 1. Severity of a disease.
Severe (grade III)
Moderate (grade II)
Mild (grade I)
Absent (grade 0).
Cont
Example 2. Home to clinic distance.
Far (10 km and more)
Reasonably near 5 – 10 km
Near (Less than 5 km)
P.K Muteti 16
Cont
Example 3. Income
High income. (Ksh. 300,000 and above)
Middle income (Ksh. 100,000 - 299.000 per month)
Low income (Less than Ksh 10,000 per month)
P.K Muteti 17
Cont
3. Interval scale: Categories are ranked in intervals between equal classes. Values
are equal distances between attributes Example: Temperature in Celsius
(centigrade) 00 - 5, 6 – 10, 10 -15, 16 - 20, 21 - 25, 26 – 300 etc.
4. Ratio scale: Is similar to interval scale in which there is equal intervals between
neighboring points. Allows comparison between intervals or differences. eg
Gender ratio. M : F ratio. calculated using division.
5. Continuous scale. Is numerical data that can theoretically be measured in
infinitely small units.
Example 1. Weight in Kilograms (Kgs). 3 Kg, 3.5 Kg, 7 Kg etc.
P.K Muteti 18
Cont
Example 2. Haemoglobin level in grams per deciliter (gm/dl).
Example 3. Income measured in Kenya shillings.
Example 3. Disability. No disability, Partial disability, Serious or Total disability.
Example 4. Serious of disease. severe, moderate, mild.
Example 5. Agreement with a statement. Totally agree, Partially agree, Agree,
Disagree, Totally disagree .
Example 6. Severity of a disease: Severe (grade III), Moderate (grade II) Mild (grade
I), Absent (grade 0).
P.K Muteti 19
Ranked data
When we have a group of observations that are first arranged from highest to
lowest according to magnitude and then assigned numbers that correspond to
each observation’s place in the sequence.
This type of data is known as ranked data.
E.g. Consider all possible causes of death in Kenya. We could make a list of all these
causes along with the number of deaths in a particular year.
Main causes of death 2019
Levels of measurement
There are 4 levels of measurement, which can be ranked from low to high.
Nominal level – Data can be categorized according to qualitative labels (names), no
ranking order. Eg Gender, marital status.
Ordinal level – Data can be can be categorized into labelled groups and ranked. Eg.
Patient satisfaction
Interval level. Data is categorized and ranked, and evenly spaced interval between
each category. Temperature in Fahrenheit or Celsius, Test scores/ grades.
Ratio level. The data can be categorized, ranked, evenly spaced interval between
each category. and has a true zero (natural zero).
Levels of measurement
Levels of measurement
Divisions of statistics
1. Descriptive statistics. Consists of collection, organization, summarization and
presentation of data.
Summarize the population data by describing what was observed in the sample
numerically or graphically.
2. Inferential statistics. Concerned with generating conclusions beyond the actual
observation.
Uses sample data to draw inferences about the population represented.
Statistical errors and approximations
The approximation error in a data value is the discrepancy between an exact value
and some approximation to it.
This error can be expressed as an absolute error (the numerical amount of the
discrepancy) or as a relative error (the absolute error divided by the data value).
Example. If we have two ice cubes; one measuring 2.000 cm and the other
measuring 2.0049 and both are measured using micrometer screw gauge (which is
not accurate to one ten – thousandth of a centimetre), the value will still register
the length as 2.000cm.
This is basically why errors will normally occur whenever we set out to “measure”
something.
Cont
The different between the true value and the measured value is called the
“absolute” or actual error,’ “statistical error”
Example if the number 2.4 is rounded to the nearest whole number, it becomes 2.
Thus true value = 2.4,
Rounded value = 2,
hence, actual error = 2 – 2.4 = -0.4
NB. Error can be Positive + or negative -.
“Statistical error” and should not be confused with a mistake made in the
calculation or recording of figures.
Percentage error
Percentage error = Absolute error / True value.
Where absolute value (or actual) error is equal to measured value – true value.
NB/ A percentage error can be + or - .
For example, a rod is known to have a diameter of 5 mm. It’s measured with
micrometer screw gauge and the diameter is recorded as 4.992 mm.
What is the percentage error in this measurement?
We have: Measured value = 4.992 True value = 5.000
Cont
Therefore actual error = 4.992 – 5.000 = 0.008 Percentage error = absolute error/
true value.
Percentage error = (- 0.008/5 x 100 = - 0.16.
NB: The “measure value” may also be used, instead of the “true value”
Sources of errors
1. Measuring devices. giving only approximate data.
2. The use of samples rather than complete investigations of populations may
produce inaccurate data.
3. Sample data may be “biased” where non random sampling techniques are
employed
4. Interviewers may obtain inaccurate data.
5. Inadequate response so that information received is unrepresentative.
Cont
6. Mistakes in recording the figure.
7. Mistakes in making calculations.
8. Errors may occur as a result of chance factor.
NB. No data collection process is free of erroneous figures.
The end
Thank you