Believe it what it is not By Prof Dr Sohail Ansari& Binary Variable

 Is there any reward for good other than good? Quran 55:60
A Lie ceases to be a lie

One cannot speak a lie with personal conviction, if one does not believe it to be truth, and a lie ceases to be a lie when one does so and will, then, never run itself to death.

 


 

 

Binary Variable: Definition, Examples

What is a Binary Variable?
A binary variable is a variable with only two values. For example:
·         1 / 0.
·         Yes / No.
·         Success / Failure.
·         Male / Female.
·         Black / White
.
·         Take the red pill, or the blue pill?
Although binary variables are commonly used in statistics (i.e. for the binomial distribution), the term “binary variable” is seldom used. This may be in part because it’s rare to come across a variable that only has two choices outside of a Bernoulli distribution.

Types of Binary Variables

Binary variables can be divided into two types: opposite and conjunct.
·         Opposite binary variables are polar opposite, like “Success” and “Failure.” Something either works, or it doesn’t. There’s no middle ground.
·         Conjunct binary variables aren’t opposites of each other. They have more of a grey area. For example, in the United States you can be affiliated with the Democrat or Republican parties. In real life though, most people aren’t staunchly republican or staunchly democrat. It’s common for people to flip flop between parties, agree with 20% of what the other party says (making them 20% of one party and 80% of the other) or even to identify as another party entirely, like the Green Party.

Types of Variables - Categorical

Categorical Variables

As the name implies, a categorical variable is made up of categories. Typically, there are a set number of categories a participant can select from and each category is distinct from the other. Familiar types of categorical variables are variables like ethnicity or marital status. A unique characteristic of many categorical variables (especially binary and nominal) is that the categories are not necessarily ordered in a meaningful way. A variable for ethnicity may be coded the following way:  African American as 1, Asian as 2, and Caucasian as 3. Which ethnicity gets assigned which number is arbitrary, so the numerical ordering of the variable doesn’t provide information about ethnicity.
A simple version of a categorical variable is called a binary variable. This type of variable lists two distinct, mutually exclusive choices. One example of a binary variable is gender (i.e., male or female).

Binary Variable Example
 

I am a:
         Male
         Female

A categorical variable that has more than two categories to select from is called a nominal variable.

Nominal Variable Example
 

How do you describe yourself? (select all that apply)
  • African American, not of Hispanic origin
  • American Indian or Alaskan Native
  • Asian/Pacific Islander
  • Hispanic/Latino
  • White, not of Hispanic origin
  • Other, please specify ______________ 

Another version of a categorical variable is an ordinal variable, a variable with categories that can be put in a logical order. However, ordinal data do not tell us about the differences between the categories. The differences between the categories could be unknown or inconsistent. For example, a participant might be asked to describe their income as low, medium, or high. While these categories can be ordered in a logical way, there is no determined increment between each.  We know that high is more than medium, but we don’t know by how much. 

Ordinal Variable Example


What is your highest level of education completed?
  • Less than high school
  • High school diploma/GED
  • Some college
  • Associate’s degree
  • Bachelor’s degree
  • Graduate degree

Examples of categorical variables]

Examples of values that might be represented in a categorical variable:
·         The blood type of a person: A, B, AB or O.
·         The state that a person lives in.
·         The political party that a voter in a European country might vote for: Christian Democrat, Social Democrat, Green Party, etc.
·         The type of a rock: igneoussedimentary or metamorphic.
·         The identity of a particular word (e.g., in a language model): One of V possible choices, for a vocabulary of size V.


Comments