What is the difference between categorical variables and numerical variables?
Numerical variables refer to values that can take a series of numbers. These values are meaningful for operations such as addition, subtraction, and averaging, while categorical variables are for the above The operation is meaningless.
Numerical variables can be divided into the following two categories:
1. Discrete variables (discrete)
The value can only be calculated using natural numbers or integer units. The values are discontinuous, and there are no other values between two adjacent values. The value of this variable is generally obtained using the counting method.
2. Continuous variable (continuous)
can take any value within a certain range. Its value is continuous. Two adjacent values can be infinitely divided, that is, infinite numbers can be taken. numerical value. Such as height, length of rope, etc.
Compared with discrete variables, continuous variables have the concept of "true zero", so multiplication and division operations can be performed.
Categorical variables can be divided into the following two categories:
1. Ordered categorical variables (ordinal)
Describes the level or order of things. The variable value can be numerical or Character type can be used to compare the pros and cons, such as the degree of liking: like very much, average, dislike.
2. Unordered categorical variables (nominal)
There is no order difference between the values. They are only used for classification and can be divided into two-category variables and multi-category variables. Two-category variables refer to All data are divided into two categories, such as male and female, right and wrong, yin and yang, etc. The binary variable is a special categorical variable with its own unique analysis method. Multi-categorical variables refer to two or more categories, such as blood type is divided into A, B, AB, O.
The difference between ordered categorical variables and unnecessary categorical variables is that the former is meaningful for "comparison" operations, while the latter is meaningless for "comparison" operations.
The above is the detailed content of What is the difference between categorical variables and numerical variables?. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

mPDF
mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

Dreamweaver Mac version
Visual web development tools

Safe Exam Browser
Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

SublimeText3 Chinese version
Chinese version, very easy to use

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool