Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 18

Topic: Variables

Course: Data Analysis Techniques Course Code: PHY293 -- Instructor: Dr. Fawad Ullah, Asst. Prof. D.O. Physics, KUST -- Email: fawad@kust.edu.pk 1
Data Analysis Techniques
Course Code: PHY293
Lecture 19
“Variables”

By: Dr. Fawad Ullah


Asst. Professor, D.O. Physics
KUST
Topic: Variables

Outline

 Definition of Variables
 Types of Variables

Course: Data Analysis Techniques Course Code: PHY293 -- Instructor: Dr. Fawad Ullah, Asst. Prof. D.O. Physics, KUST -- Email: fawad@kust.edu.pk 3
Topic: Variables

Definition of Variables

Variables are properties or characteristics of some event, object, or person that can
take on different values or amounts
Opposite of variable is constant
For example π is a constant that do not vary.
Constant has got a fixed value

Course: Data Analysis Techniques Course Code: PHY293 -- Instructor: Dr. Fawad Ullah, Asst. Prof. D.O. Physics, KUST -- Email: fawad@kust.edu.pk 4
Topic: Variables
Definition of Variable
 When conducting research, experimenters often manipulate variables.
 For example, an experimenter might compare the effectiveness of four types of
antidepressants.
 In this case, the variable is “type of antidepressant.”
 When a variable is manipulated by an experimenter, it is called an independent variable.
 The experiment seeks to determine the effect of the independent variable on relief from
depression.
 In this example, relief from depression is called a dependent variable.
 In general, the independent variable is manipulated by the experimenter and its effects on the
dependent variable are measured.
Course: Data Analysis Techniques Course Code: PHY293 -- Instructor: Dr. Fawad Ullah, Asst. Prof. D.O. Physics, KUST -- Email: fawad@kust.edu.pk 5
Topic: Variables

Example 1
Can blueberries slow down aging?
A study indicates that antioxidants found in blueberries may slow down the process of
aging.
In this study, 19-month-old rats (equivalent to 60-year-old humans) were fed either their
standard diet or a diet supplemented by either blueberry, strawberry, or spinach powder.
After eight weeks, the rats were given memory and motor skills tests. Although all
supplemented rats showed improvement, those supplemented with blueberry powder
showed the most notable improvement.
Result: What is the independent variable? (dietary supplement: none, blueberry,
strawberry, and spinach)
Course: Data Analysis Techniques Course Code: PHY293 -- Instructor: Dr. Fawad Ullah, Asst. Prof. D.O. Physics, KUST -- Email: fawad@kust.edu.pk 6
Topic: Variables

Example 2

What are the dependent variables? (memory test and motor skills test) Example #2:
Does beta-carotene protect against cancer?
Beta-carotene supplements have been thought to protect against cancer. However, a study
published in the Journal of the National Cancer Institute suggests this is false. The study
was conducted with 39,000 women aged 45 and up. These
women were randomly assigned to receive a beta-carotene supplement or a placebo, and
their health was studied over their lifetime. Cancer rates for women taking the beta-
carotene supplement did not differ systematically from the cancer rates of those women
taking the placebo.
Course: Data Analysis Techniques Course Code: PHY293 -- Instructor: Dr. Fawad Ullah, Asst. Prof. D.O. Physics, KUST -- Email: fawad@kust.edu.pk 7
Topic: Variables

Example 2….Conti

1. What is the independent variable? (supplements: beta-carotene or placebo)


2. What is the dependent variable? (occurrence of cancer)

Course: Data Analysis Techniques Course Code: PHY293 -- Instructor: Dr. Fawad Ullah, Asst. Prof. D.O. Physics, KUST -- Email: fawad@kust.edu.pk 8
Topic: Variables

Outline
Car’s headlight; How bright is right?
An automobile manufacturer wants to know how bright brake lights should be in order
to minimize the time required for the driver of a following car to realize that the car in
front is stopping and to hit the brakes.

1. What is the independent variable? (brightness of brake lights)


2. What is the dependent variable? (time to hit brakes)

Course: Data Analysis Techniques Course Code: PHY293 -- Instructor: Dr. Fawad Ullah, Asst. Prof. D.O. Physics, KUST -- Email: fawad@kust.edu.pk 9
Topic: Variables

Levels of an Independent Variable

 If an experiment compares an experimental treatment with a control treatment,


 then the independent variable (type of treatment) has two levels:
 experimental and control.
 If an experiment were comparing five types of diets, then the independent variable
(type of diet) would have 5 levels.
 In general, the number of levels of an independent variable is the number of
experimental conditions.

Course: Data Analysis Techniques Course Code: PHY293 -- Instructor: Dr. Fawad Ullah, Asst. Prof. D.O. Physics, KUST -- Email: fawad@kust.edu.pk 10
Topic: Variables

Qualitative and Quantitative Variables


Qualitative variables
 Those that express a qualitative attribute such as hair color, eye color, religion, favorite
movie, gender, and so on.
 The values of a qualitative variable do not imply a numerical ordering.
 For example “religion” is a qualitative variable that differ qualitatively; no numerical
ordering of religions is implied.
 Qualitative variables are sometimes referred to as categorical variables.

Course: Data Analysis Techniques Course Code: PHY293 -- Instructor: Dr. Fawad Ullah, Asst. Prof. D.O. Physics, KUST -- Email: fawad@kust.edu.pk 11
Topic: Variables

Qualitative and Quantitative Variables


Quantitative variables
Those variables that are measured in terms of numbers.
 Some examples of quantitative variables are height, weight, and shoe size.
 In the study on the effect of diet discussed previously, the independent variable was
type of supplement: none, strawberry, blueberry, and spinach.
 The variable “type of supplement” is a qualitative variable
 In contrast, the dependent variable “memory test” is a quantitative
 variable since memory performance was measured on a quantitative scale
(number correct).

Course: Data Analysis Techniques Course Code: PHY293 -- Instructor: Dr. Fawad Ullah, Asst. Prof. D.O. Physics, KUST -- Email: fawad@kust.edu.pk 12
Topic: Variables

Discrete and Continuous Variables

 Variables such as number of children in a household are called discrete variables since
the possible scores are discrete points on the scale.
 For example, a household could have three children or six children, but not 4.53
children.
 Other variables such as “time to respond to a question” are continuous variables since
the scale is continuous and not made up of discrete steps.
 The response time could be 1.64 seconds, or it could be 1.64237123922121 seconds.

Course: Data Analysis Techniques Course Code: PHY293 -- Instructor: Dr. Fawad Ullah, Asst. Prof. D.O. Physics, KUST -- Email: fawad@kust.edu.pk 13
Topic: Variables
Common Types of Variables

Categorical variable: variables then can be put into categories. For example, the category
“Toothpaste Brands” might contain the variables Colgate and Aquafresh.
Confounding variable: extra variables that have a hidden effect on your experimental
results. You collect data on sunburns and ice cream consumption. You find that higher ice cream consumption is
associated with a higher probability of sunburn. Does that mean ice cream consumption causes sunburn?
Here, the confounding variable is temperature: hot temperatures cause people to both eat more ice cream and spend
more time outdoors under the sun, resulting in more sunburns.

Continuous variable: a variable with infinite number of values, like “time” or “weight”.
Control variable: a factor in an experiment which must be held constant. For example, in
an experiment to determine whether light makes plants grow faster, you would have to
control for soil quality and water.

Course: Data Analysis Techniques Course Code: PHY293 -- Instructor: Dr. Fawad Ullah, Asst. Prof. D.O. Physics, KUST -- Email: fawad@kust.edu.pk 14
Topic: Variables
Common Types of Variables
Dependent variable: the outcome of an experiment. As you change the independent
variable, you watch what happens to the dependent variable.
Discrete variable: a variable that can only take on a certain number of values. For
example, “number of cars in a parking lot” is discrete because a car park can only hold so
many cars.
Independent variable: a variable that is not affected by anything that you, the researcher,
does. Usually plotted on the x-axis.
Lurking variable: a “hidden” variable which affects the relationship between the
independent and dependent variables. For example, a research scientist studies the effect of diet and
exercise on a person's blood pressure. Lurking variables that also affect blood pressure are whether a person smokes
and stress levels.
Course: Data Analysis Techniques Course Code: PHY293 -- Instructor: Dr. Fawad Ullah, Asst. Prof. D.O. Physics, KUST -- Email: fawad@kust.edu.pk 15
Topic: Variables
Common Types of Variables

A measurement variable has a number associated with it. It’s an “amount” of something,
or a “number” of something.
Nominal variable: another name for categorical variable. Giving name to a number or
variable. For example, what is your experience? Below 6 months, one year, above 3 years.
Ordinal variable: similar to a categorical variable, but there is a clear order. For example,
income levels of low, middle, and high could be considered ordinal.
Qualitative variable: a broad category for any variable that can’t be counted (i.e. has no
numerical value). Nominal and ordinal variables fall under this umbrella term.

Course: Data Analysis Techniques Course Code: PHY293 -- Instructor: Dr. Fawad Ullah, Asst. Prof. D.O. Physics, KUST -- Email: fawad@kust.edu.pk 16
Topic: Variables
Common Types of Variables

Quantitative variable: A broad category that includes any variable that can be counted, or
has a numerical value associated with it. Examples of variables that fall into this category
include discrete variables and ratio variables.
Random variables: are associated with random processes and give numbers to outcomes
of random events.
A ranked variable is an ordinal variable; a variable where every data point can be put in
order (1st, 2nd, 3rd, etc.).
Ratio variables: similar to interval variables, but has a meaningful zero.

Course: Data Analysis Techniques Course Code: PHY293 -- Instructor: Dr. Fawad Ullah, Asst. Prof. D.O. Physics, KUST -- Email: fawad@kust.edu.pk 17
Topic: Variables

Thank You

Course: Data Analysis Techniques Course Code: PHY293 -- Instructor: Dr. Fawad Ullah, Asst. Prof. D.O. Physics, KUST -- Email: fawad@kust.edu.pk 18

You might also like