[{"data":1,"prerenderedAt":650},["ShallowReactive",2],{"content-query-liypkF4Xro":3},{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":9,"heading":10,"prompt":11,"tags":15,"files":18,"nav":18,"presets":19,"gallery":36,"body":38,"_type":643,"_id":644,"_source":645,"_file":646,"_stem":647,"_extension":648,"sitemap":649},"/tools/qq-plot","tools",false,"","Q-Q Plot Generator for Normality Testing","Create Q-Q plots online from Excel and CSV data. Compare sample distributions to theoretical distributions and check normality with AI.","Q-Q Plot Generator",{"prefix":12,"label":13,"placeholder":14},"Create a Q-Q plot","Describe the Q-Q plot you want to create","e.g. Q-Q plot of exam scores to check normality, add confidence band",[16,17],"charts","statistics",true,[20,26,31],{"label":21,"prompt":22,"dataset_url":23,"dataset_title":24,"dataset_citation":25},"Life expectancy normality check","Q-Q plot of life expectancy values for all countries in the most recent year against a normal distribution; add 95% confidence band; annotate any countries that deviate significantly from the line","https://ourworldindata.org/grapher/life-expectancy.csv","Life expectancy","Our World in Data",{"label":27,"prompt":28,"dataset_url":29,"dataset_title":30,"dataset_citation":25},"GDP per capita distribution check","Q-Q plot of GDP per capita (log-transformed) against normal distribution to check if log-GDP is normally distributed; also show a Q-Q plot without log transform for comparison; add confidence envelope","https://ourworldindata.org/grapher/gdp-per-capita-worldbank.csv","GDP per capita (World Bank)",{"label":32,"prompt":33,"dataset_url":34,"dataset_title":35,"dataset_citation":25},"CO₂ emissions vs log-normal","Q-Q plot of CO2 emissions per capita against a log-normal distribution; also try normal distribution; determine which fits better; annotate the largest deviating countries","https://ourworldindata.org/grapher/co-emissions-per-capita.csv","CO₂ emissions per capita",[37],"/img/tools/qq-plot.png",{"type":39,"children":40,"toc":634},"root",[41,50,85,125,157,163,221,227,383,389,497,503,532,538,548,558,594,617],{"type":42,"tag":43,"props":44,"children":46},"element","h2",{"id":45},"what-is-a-q-q-plot",[47],{"type":48,"value":49},"text","What Is a Q-Q Plot?",{"type":42,"tag":51,"props":52,"children":53},"p",{},[54,56,62,64,69,71,76,78,83],{"type":48,"value":55},"A ",{"type":42,"tag":57,"props":58,"children":59},"strong",{},[60],{"type":48,"value":61},"Q-Q plot",{"type":48,"value":63}," (quantile-quantile plot) is a graphical method for comparing the distribution of a dataset against a ",{"type":42,"tag":57,"props":65,"children":66},{},[67],{"type":48,"value":68},"theoretical reference distribution",{"type":48,"value":70}," — most commonly the normal (Gaussian) distribution. The plot places the ",{"type":42,"tag":57,"props":72,"children":73},{},[74],{"type":48,"value":75},"theoretical quantiles",{"type":48,"value":77}," of the reference distribution on the x-axis and the corresponding ",{"type":42,"tag":57,"props":79,"children":80},{},[81],{"type":48,"value":82},"sample quantiles",{"type":48,"value":84}," from your data on the y-axis. If the data follows the theoretical distribution, the points fall along a straight diagonal reference line. Deviations from this line reveal exactly how and where the distributions differ.",{"type":42,"tag":51,"props":86,"children":87},{},[88,90,95,97,102,104,109,111,116,118,123],{"type":48,"value":89},"The shape of the deviation tells you what kind of departure from normality you have. An ",{"type":42,"tag":57,"props":91,"children":92},{},[93],{"type":48,"value":94},"S-curve",{"type":48,"value":96}," (points curving above the line at both ends) signals ",{"type":42,"tag":57,"props":98,"children":99},{},[100],{"type":48,"value":101},"heavy tails",{"type":48,"value":103}," — more extreme values than a normal distribution would predict, common in financial returns or test scores. A ",{"type":42,"tag":57,"props":105,"children":106},{},[107],{"type":48,"value":108},"convex curve",{"type":48,"value":110}," (points bowing above the line on the right) indicates ",{"type":42,"tag":57,"props":112,"children":113},{},[114],{"type":48,"value":115},"right skew",{"type":48,"value":117}," — a long upper tail typical of income, wealth, and population data. Points that follow the line perfectly until they step sideways at the extremes indicate a ",{"type":42,"tag":57,"props":119,"children":120},{},[121],{"type":48,"value":122},"bimodal",{"type":48,"value":124}," distribution with two separate sub-populations. This visual diagnostic is far more informative than a single p-value from a normality test, which can reject normality for trivial deviations in large samples or fail to detect real departures in small ones.",{"type":42,"tag":51,"props":126,"children":127},{},[128,130,134,136,141,143,148,150,155],{"type":48,"value":129},"Q-Q plots are widely used in ",{"type":42,"tag":57,"props":131,"children":132},{},[133],{"type":48,"value":17},{"type":48,"value":135}," (checking whether regression residuals are normally distributed before reporting t-tests and F-tests), ",{"type":42,"tag":57,"props":137,"children":138},{},[139],{"type":48,"value":140},"quality control",{"type":48,"value":142}," (verifying that manufacturing measurements follow a specified distribution), ",{"type":42,"tag":57,"props":144,"children":145},{},[146],{"type":48,"value":147},"finance",{"type":48,"value":149}," (examining whether log-returns have heavier tails than normal — they almost always do), and ",{"type":42,"tag":57,"props":151,"children":152},{},[153],{"type":48,"value":154},"scientific research",{"type":48,"value":156}," (checking assumptions before applying parametric tests). They can also compare a sample against any reference: log-normal, exponential, uniform, or even another empirical dataset.",{"type":42,"tag":43,"props":158,"children":160},{"id":159},"how-it-works",[161],{"type":48,"value":162},"How It Works",{"type":42,"tag":164,"props":165,"children":166},"ol",{},[167,178,194],{"type":42,"tag":168,"props":169,"children":170},"li",{},[171,176],{"type":42,"tag":57,"props":172,"children":173},{},[174],{"type":48,"value":175},"Upload your data",{"type":48,"value":177}," — provide a CSV or Excel file with at least one numeric column to test. One row per observation.",{"type":42,"tag":168,"props":179,"children":180},{},[181,186,188],{"type":42,"tag":57,"props":182,"children":183},{},[184],{"type":48,"value":185},"Describe the plot",{"type":48,"value":187}," — e.g. ",{"type":42,"tag":189,"props":190,"children":191},"em",{},[192],{"type":48,"value":193},"\"Q-Q plot of exam scores against normal distribution, add 95% confidence band, flag outliers\"",{"type":42,"tag":168,"props":195,"children":196},{},[197,202,204,211,213,219],{"type":42,"tag":57,"props":198,"children":199},{},[200],{"type":48,"value":201},"Get the visualization",{"type":48,"value":203}," — the AI writes Python code using ",{"type":42,"tag":205,"props":206,"children":208},"a",{"href":207},"https://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.probplot.html",[209],{"type":48,"value":210},"scipy",{"type":48,"value":212}," and ",{"type":42,"tag":205,"props":214,"children":216},{"href":215},"https://plotly.com/python/",[217],{"type":48,"value":218},"Plotly",{"type":48,"value":220}," to compute theoretical quantiles and render the plot with the reference line",{"type":42,"tag":43,"props":222,"children":224},{"id":223},"interpreting-the-results",[225],{"type":48,"value":226},"Interpreting the Results",{"type":42,"tag":228,"props":229,"children":230},"table",{},[231,250],{"type":42,"tag":232,"props":233,"children":234},"thead",{},[235],{"type":42,"tag":236,"props":237,"children":238},"tr",{},[239,245],{"type":42,"tag":240,"props":241,"children":242},"th",{},[243],{"type":48,"value":244},"Pattern on the Q-Q plot",{"type":42,"tag":240,"props":246,"children":247},{},[248],{"type":48,"value":249},"What it means",{"type":42,"tag":251,"props":252,"children":253},"tbody",{},[254,271,287,303,319,335,351,367],{"type":42,"tag":236,"props":255,"children":256},{},[257,266],{"type":42,"tag":258,"props":259,"children":260},"td",{},[261],{"type":42,"tag":57,"props":262,"children":263},{},[264],{"type":48,"value":265},"Points on the diagonal line",{"type":42,"tag":258,"props":267,"children":268},{},[269],{"type":48,"value":270},"Data follows the reference distribution closely",{"type":42,"tag":236,"props":272,"children":273},{},[274,282],{"type":42,"tag":258,"props":275,"children":276},{},[277],{"type":42,"tag":57,"props":278,"children":279},{},[280],{"type":48,"value":281},"S-curve (both ends bow away)",{"type":42,"tag":258,"props":283,"children":284},{},[285],{"type":48,"value":286},"Heavy tails — more extreme values than expected",{"type":42,"tag":236,"props":288,"children":289},{},[290,298],{"type":42,"tag":258,"props":291,"children":292},{},[293],{"type":42,"tag":57,"props":294,"children":295},{},[296],{"type":48,"value":297},"Inverted S-curve",{"type":42,"tag":258,"props":299,"children":300},{},[301],{"type":48,"value":302},"Light tails — fewer extreme values than expected",{"type":42,"tag":236,"props":304,"children":305},{},[306,314],{"type":42,"tag":258,"props":307,"children":308},{},[309],{"type":42,"tag":57,"props":310,"children":311},{},[312],{"type":48,"value":313},"Convex curve (bows up on right)",{"type":42,"tag":258,"props":315,"children":316},{},[317],{"type":48,"value":318},"Right skew — long upper tail, most values are small",{"type":42,"tag":236,"props":320,"children":321},{},[322,330],{"type":42,"tag":258,"props":323,"children":324},{},[325],{"type":42,"tag":57,"props":326,"children":327},{},[328],{"type":48,"value":329},"Concave curve (bows down on left)",{"type":42,"tag":258,"props":331,"children":332},{},[333],{"type":48,"value":334},"Left skew — long lower tail, most values are large",{"type":42,"tag":236,"props":336,"children":337},{},[338,346],{"type":42,"tag":258,"props":339,"children":340},{},[341],{"type":42,"tag":57,"props":342,"children":343},{},[344],{"type":48,"value":345},"Points follow line then step right",{"type":42,"tag":258,"props":347,"children":348},{},[349],{"type":48,"value":350},"Bimodal or mixture distribution",{"type":42,"tag":236,"props":352,"children":353},{},[354,362],{"type":42,"tag":258,"props":355,"children":356},{},[357],{"type":42,"tag":57,"props":358,"children":359},{},[360],{"type":48,"value":361},"Single outlier point far off the line",{"type":42,"tag":258,"props":363,"children":364},{},[365],{"type":48,"value":366},"Individual extreme observation worth investigating",{"type":42,"tag":236,"props":368,"children":369},{},[370,378],{"type":42,"tag":258,"props":371,"children":372},{},[373],{"type":42,"tag":57,"props":374,"children":375},{},[376],{"type":48,"value":377},"95% confidence band",{"type":42,"tag":258,"props":379,"children":380},{},[381],{"type":48,"value":382},"Region where points are expected if data is truly normal",{"type":42,"tag":43,"props":384,"children":386},{"id":385},"example-prompts",[387],{"type":48,"value":388},"Example Prompts",{"type":42,"tag":228,"props":390,"children":391},{},[392,408],{"type":42,"tag":232,"props":393,"children":394},{},[395],{"type":42,"tag":236,"props":396,"children":397},{},[398,403],{"type":42,"tag":240,"props":399,"children":400},{},[401],{"type":48,"value":402},"Scenario",{"type":42,"tag":240,"props":404,"children":405},{},[406],{"type":48,"value":407},"What to type",{"type":42,"tag":251,"props":409,"children":410},{},[411,429,446,463,480],{"type":42,"tag":236,"props":412,"children":413},{},[414,419],{"type":42,"tag":258,"props":415,"children":416},{},[417],{"type":48,"value":418},"Normality check",{"type":42,"tag":258,"props":420,"children":421},{},[422],{"type":42,"tag":423,"props":424,"children":426},"code",{"className":425},[],[427],{"type":48,"value":428},"Q-Q plot of residuals against normal distribution with 95% confidence band",{"type":42,"tag":236,"props":430,"children":431},{},[432,437],{"type":42,"tag":258,"props":433,"children":434},{},[435],{"type":48,"value":436},"Skew detection",{"type":42,"tag":258,"props":438,"children":439},{},[440],{"type":42,"tag":423,"props":441,"children":443},{"className":442},[],[444],{"type":48,"value":445},"Q-Q plot of income values, also try log-normal reference",{"type":42,"tag":236,"props":447,"children":448},{},[449,454],{"type":42,"tag":258,"props":450,"children":451},{},[452],{"type":48,"value":453},"Compare distributions",{"type":42,"tag":258,"props":455,"children":456},{},[457],{"type":42,"tag":423,"props":458,"children":460},{"className":459},[],[461],{"type":48,"value":462},"Q-Q plot comparing the sample against normal, t(5), and log-normal — which fits best?",{"type":42,"tag":236,"props":464,"children":465},{},[466,471],{"type":42,"tag":258,"props":467,"children":468},{},[469],{"type":48,"value":470},"Multiple groups",{"type":42,"tag":258,"props":472,"children":473},{},[474],{"type":42,"tag":423,"props":475,"children":477},{"className":476},[],[478],{"type":48,"value":479},"Q-Q plots for each department's salary separately, 2x3 grid",{"type":42,"tag":236,"props":481,"children":482},{},[483,488],{"type":42,"tag":258,"props":484,"children":485},{},[486],{"type":48,"value":487},"Two-sample Q-Q",{"type":42,"tag":258,"props":489,"children":490},{},[491],{"type":42,"tag":423,"props":492,"children":494},{"className":493},[],[495],{"type":48,"value":496},"two-sample Q-Q plot comparing treatment vs control group outcomes",{"type":42,"tag":43,"props":498,"children":500},{"id":499},"related-tools",[501],{"type":48,"value":502},"Related Tools",{"type":42,"tag":51,"props":504,"children":505},{},[506,508,514,516,522,524,530],{"type":48,"value":507},"Use the ",{"type":42,"tag":205,"props":509,"children":511},{"href":510},"/tools/residual-plot",[512],{"type":48,"value":513},"Residual Plot Generator",{"type":48,"value":515}," to run the full suite of regression diagnostic plots including residuals vs fitted, scale-location, and leverage — the Q-Q plot is one panel of the full diagnostic. Use the ",{"type":42,"tag":205,"props":517,"children":519},{"href":518},"/tools/density-plot",[520],{"type":48,"value":521},"Density Plot Generator",{"type":48,"value":523}," to show the continuous distribution shape of your data visually rather than as a quantile comparison. Use the ",{"type":42,"tag":205,"props":525,"children":527},{"href":526},"/tools/ai-histogram-generator",[528],{"type":48,"value":529},"AI Histogram Generator",{"type":48,"value":531}," to display the raw distribution as bins with an optional normal curve overlay for audiences less familiar with Q-Q plots.",{"type":42,"tag":43,"props":533,"children":535},{"id":534},"frequently-asked-questions",[536],{"type":48,"value":537},"Frequently Asked Questions",{"type":42,"tag":51,"props":539,"children":540},{},[541,546],{"type":42,"tag":57,"props":542,"children":543},{},[544],{"type":48,"value":545},"How do I read a Q-Q plot if I'm not familiar with quantiles?",{"type":48,"value":547},"\nThink of it this way: the x-axis asks \"where would this data point be if it came from a perfect normal distribution?\" and the y-axis shows \"where the data point actually is.\" When both agree, the point sits on the diagonal line. A point above the line means the actual value is higher than expected; below the line means it's lower. The further the points stray from the line, the more the distribution differs from normal.",{"type":42,"tag":51,"props":549,"children":550},{},[551,556],{"type":42,"tag":57,"props":552,"children":553},{},[554],{"type":48,"value":555},"My points follow the line in the middle but curve away at the ends — is that normal?",{"type":48,"value":557},"\nSome departure at the extreme tails is expected and acceptable in most datasets, especially with fewer than ~50 observations. A 95% confidence band (ask the AI to add one) helps you distinguish expected sampling variability from genuine departures. If many points fall outside the band, the normality assumption is likely violated.",{"type":42,"tag":51,"props":559,"children":560},{},[561,566,568,573,575,580,581,586,587,592],{"type":42,"tag":57,"props":562,"children":563},{},[564],{"type":48,"value":565},"Can I compare my data against a distribution other than normal?",{"type":48,"value":567},"\nYes — ask for a Q-Q plot against ",{"type":42,"tag":189,"props":569,"children":570},{},[571],{"type":48,"value":572},"\"exponential\"",{"type":48,"value":574},", ",{"type":42,"tag":189,"props":576,"children":577},{},[578],{"type":48,"value":579},"\"log-normal\"",{"type":48,"value":574},{"type":42,"tag":189,"props":582,"children":583},{},[584],{"type":48,"value":585},"\"uniform\"",{"type":48,"value":574},{"type":42,"tag":189,"props":588,"children":589},{},[590],{"type":48,"value":591},"\"t distribution with 5 degrees of freedom\"",{"type":48,"value":593},", or any distribution supported by scipy. This is useful when you have reason to believe your data follows a specific non-normal distribution and want to verify.",{"type":42,"tag":51,"props":595,"children":596},{},[597,602,604,609,610,615],{"type":42,"tag":57,"props":598,"children":599},{},[600],{"type":48,"value":601},"What's the difference between a Q-Q plot and a normality test like Shapiro-Wilk?",{"type":48,"value":603},"\nA normality test produces a single p-value that says \"reject\" or \"don't reject\" normality at a threshold. A Q-Q plot shows ",{"type":42,"tag":189,"props":605,"children":606},{},[607],{"type":48,"value":608},"where",{"type":48,"value":212},{"type":42,"tag":189,"props":611,"children":612},{},[613],{"type":48,"value":614},"how",{"type":48,"value":616}," the distribution deviates — whether it's the tails, the center, a skew, or a bimodal split. For large samples, Shapiro-Wilk will reject normality even for trivially small deviations; the Q-Q plot lets you judge whether the departure is practically meaningful.",{"type":42,"tag":51,"props":618,"children":619},{},[620,625,627,632],{"type":42,"tag":57,"props":621,"children":622},{},[623],{"type":48,"value":624},"Can I make a two-sample Q-Q plot to compare two groups directly?",{"type":48,"value":626},"\nYes — ask for a ",{"type":42,"tag":189,"props":628,"children":629},{},[630],{"type":48,"value":631},"\"two-sample Q-Q plot\"",{"type":48,"value":633}," of two columns or two filtered groups. Instead of comparing against a theoretical distribution, the x-axis shows quantiles of one group and the y-axis shows quantiles of the other. Points on the diagonal mean the two distributions are identical; deviations show where and how they differ.",{"title":7,"searchDepth":635,"depth":635,"links":636},2,[637,638,639,640,641,642],{"id":45,"depth":635,"text":49},{"id":159,"depth":635,"text":162},{"id":223,"depth":635,"text":226},{"id":385,"depth":635,"text":388},{"id":499,"depth":635,"text":502},{"id":534,"depth":635,"text":537},"markdown","content:tools:027.qq-plot.md","content","tools/027.qq-plot.md","tools/027.qq-plot","md",{"loc":4},1775502468196]