Number of bits (quantile)

Source: Internet
Author: User

------------------------------------------------------------------------------------------------------

Thequartile, which is statistically , arranges all the values from small to large and divides them into four equal points, with a score of four in the three-point position.

The 14th Division (Q1), also known as the "smaller four", is equal to the number of all values in the sample from small to large after the 25th.

The 24th (Q2), also known as the " median", is equal to the number of all values in the sample from small to large after the 50th.

The 34th Division (Q3), also known as the "larger four", equals the number of all values in the sample from small to large after the 75th.

The gap between the 34th and 14th is also known as the four-point distance (Interquartile range,iqr).

First determine the location of the four-digit:

Q1 the location = (n+1) x0.25

Q2 the location = (n+1) x0.5

Q3 the location = (n+1) x0.75

n indicates the number of items

There are different methods for determining the four-bit number, and the other is based on the N-1 basis. That

Q1 position = (n-1) x 0.25

Q2 position = (n-1) x 0.5

Q3 position = (n-1) x 0.75

There are two four-digit functions in Excel. Quartile. EXC and Quartile.inc

Quatile. EXC based on the N+1 method, quartile. Inc based on the N-1 method.

Example 1

Total data: 6, 47, 49, 15, 42, 41, 7, 39, 43, 40, 36

Results arranged from small to large: 6, 7, 15, 36, 39, 40, 41, 42, 43, 47, 49

Altogether 11 items

Position of Q1 = (11+1) x0.25=3, location of Q2 = (11+1) x0.5=6, Q3 position = (11+1) x0.75=9

Q1 = 15,

Q2 = 40,

Q3 = 43

Example 2

Total data: 7, 15, 36, 39, 40, 41

Altogether 6 items

Position of Q1 = (6+1) x0.25=1.75, location of Q2 = (6+1) x0.5=3.5, Q3 position = (6+1) x0.75=5.25

Q1 = 7+ (15-7) x (1.75-1) = 13,

Q2 = 36+ (39-36) x (3.5-3) = 37.5,

Q3 = 40+ (41-40) x (5.25-5) = 40.25

1, the data from small to large sorting, count a (1 to n), n represents the length of the data

2, determine the location of the four-digit: b= 1+ (n-1) x0.25= 2.25,b The integer portion of C B is counted as the fractional part of D

Calculation q1:q1=a (c) +[a (c+1)-A (c)]*d=a (1) +[a (2)-A (1)] *0.25 =15+ (36-15) x (2.25-2) =20.25

3, calculated as above Q2 and Q3 similar to the method, four sub-position difference =q3-q1

R language Examples > x=c (6, 7, G, G, G, Max, G, G, G, C, $)> quantile (x,.25)

Number of bits (quantile)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.