Quantile-Quantile Plot_學術

來源:互聯網
上載者:User

Purpose:
Check If Two Data Sets Can Be Fit With the Same Distribution The quantile-quantile (q-q) plot is a graphical technique for determining if two data sets come from populations with a common distribution.

A q-q plot is a plot of the quantiles of the first data set against the quantiles of the second data set. By a quantile, we mean the point below which a given fraction (or percent) of points lies. That is, the 0.3 (or 30%) quantile is the point at which 30% percent of the data fall below and 70% fall above that value.

A 45-degree reference line is also plotted. If the two sets come from a population with the same distribution, the points should fall approximately along this reference line. The greater the departure from this reference line, the greater the evidence for the conclusion that the two data sets have come from populations with different distributions.

The advantages of the q-q plot are: The sample sizes do not need to be equal.

Many distributional aspects can be simultaneously tested. For example, shifts in location, shifts in scale, changes in symmetry, and the presence of outliers can all be detected from this plot. For example, if the two data sets come from populations whose distributions differ only by a shift in location, the points should lie along a straight line that is displaced either up or down from the 45-degree reference line.

The q-q plot is similar to a probability plot. For a probability plot, the quantiles for one of the data samples are replaced with the quantiles of a theoretical distribution. Sample Plot

This q-q plot shows that These 2 batches do not appear to have come from populations with a common distribution. The batch 1 values are significantly higher than the corresponding batch 2 values. The differences are increasing from values 525 to 625. Then the values for the 2 batches get closer again. Definition:
Quantiles for Data Set 1 Versus Quantiles of Data Set 2 The q-q plot is formed by: Vertical axis: Estimated quantiles from data set 1 Horizontal axis: Estimated quantiles from data set 2

Both axes are in units of their respective data sets. That is, the actual quantile level is not plotted. For a given point on the q-q plot, we know that the quantile level is the same for both points, but not what that quantile level actually is.

If the data sets have the same size, the q-q plot is essentially a plot of sorted data set 1 against sorted data set 2. If the data sets are not of equal size, the quantiles are usually picked to correspond to the sorted values from the smaller data set and then the quantiles for the larger data set are interpolated. Questions The q-q plot is used to answer the following questions: Do two data sets come from populations with a common distribution? Do two data sets have common location and scale? Do two data sets have similar distributional shapes? Do two data sets have similar tail behavior? Importance: Check for Common Distribution When there are two data samples, it is often desirable to know if the assumption of a common distribution is justified. If so, then location and scale estimators can pool both data sets to obtain estimates of the common location and scale. If two samples do differ, it is also useful to gain some understanding of the differences. The q-q plot can provide more insight into the nature of the difference than analytical methods such as the chi-square and Kolmogorov-Smirnov 2-sample tests. Related Techniques Bihistogram
T Test
F Test
2-Sample Chi-Square Test
2-Sample Kolmogorov-Smirnov Test Case Study The quantile-quantile plot is demonstrated in the ceramic strength data case study. Software Q-Q plots are available in some general purpose statistical software programs, including Dataplot. If the number of data points in the two samples are equal, it should be relatively easy to write a macro in statistical programs that do not support the q-q plot. If the number of points are not equal, writing a macro for a q-q plot may be difficult.


http://www.itl.nist.gov/div898/handbook/eda/section3/qqplot.htm





Q-Q plot 即Quantile-Quantile Plot。它在各類研究中經常用到,主要是直觀的表示觀測值與預測值之間的差異。

在SPSS中很容做,Analysis - Descriptive statistics - Q-Qplot。

Q-Q plot主要是用來估計數量性狀觀測值與預測值之間的差異。一般我們所取得的數量性狀資料都為常態分佈資料。在GWAS研究中Q-Q plot的X和Y軸主要是代表各個SNP的-lg P values。預測的線是一條從原點發出的45°角的虛線。實際觀測值則是標的實心點。

Q-Q plot主要要點:

預測的虛線為什麼是45°出來的呢。因為預測的線實際是通過在QQ圖中第一象限作圖得出。理論上一個點A在該圖上的位置應該是A預測值=A實際值,轉化為座標就是A(x,y)x=y。所以預測的線是一條從原點發出的45°線。

觀測值的點的座標是怎麼得出來的。同樣設點A的座標是(x,y)x為預測值,y為實際觀測值。查了一下R 中qq plot的演算法是這樣的

pvals <- read.table("DGI_chr3_pvals.txt", header=T)

observed <- sort(pvals$PVAL)
lobs <- -(log10(observed))

expected <- c(1:length(observed))
lexp <- -(log10(expected / (length(expected)+1)))

具體解釋是這樣的,先把P值從小到大排序。lobs代表縱座標,lexp代表橫座標,縱座標就是觀測P值的-log10,而橫座標則根據P值數目而定。比如,當只有3個P值 P1=0.0001 P2=0.001 P3=0.01,那麼在這個P值組中,length(observed)=3,對於P1=0.0001 expected=1 lexp=-log10(1/3+1),對於P2=0.001 expected=2 lexp=-log10(2/3+1), P3=0.01 expected=3 lexp=-log10(3/3+1)。。。。。依此類推。 如果出現了偏離的情況說明實際值跟預測值有偏差,在GWAS研究中,那個SNP點出現了較大的偏離,則認為這個SNP位點的觀測值的偏離是由這個SNP突變所產生的遺傳作用造成的

http://blog.csdn.net/likelet/article/details/7377664


聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.