

{"id":4965,"date":"2018-01-03T10:37:34","date_gmt":"2018-01-03T05:07:34","guid":{"rendered":"https:\/\/data-flair.training\/blogs\/?p=4965"},"modified":"2020-02-03T16:56:58","modified_gmt":"2020-02-03T11:26:58","slug":"r-statistics","status":"publish","type":"post","link":"https:\/\/data-flair.training\/blogs\/r-statistics\/","title":{"rendered":"Statistics and R &#8211; Clear up your Stats problems with R Programming!"},"content":{"rendered":"<p style=\"text-align: center\"><em><span style=\"color: #ff6600\"><strong>&#8220;Statistics can be made to prove anything &#8211; Even the truth&#8221;<\/strong><\/span><\/em><\/p>\n<p>Have you ever solved any statistics problem in just a few minutes? I bet you never did so. In fact, even I was unable to solve statistics problems until I got to know about R programming. Yes! R is the ultimate solution to every statistics problem and DataFlair is the way to <a href=\"https:\/\/data-flair.training\/blogs\/r-tutorials-home\/\"><em><strong>master R programming<\/strong><\/em><\/a>. Today, I am going to clear every doubt of yours related to Statistics and R. So, follow the blog and learn statistics with R.<\/p>\n<h2>Introduction to Statistics for R<\/h2>\n<p><span style=\"font-weight: 400\">R Statistics concerns data; their collection, analysis, and interpretation. It has the following two types:<\/span><\/p>\n<ul>\n<li><strong>Descriptive statistics<\/strong><\/li>\n<\/ul>\n<p>It is about providing a description of the data. It deals with the quantitative description of data through numerical representations or graphs.<\/p>\n<p><strong>Example: <em><a href=\"https:\/\/data-flair.training\/blogs\/normal-distribution-in-r\/\">Normal Distribution<\/a><\/em><\/strong>, Central Tendency, Kurtosis, etc. are some of the statistical techniques in Descriptive Statistics.<\/p>\n<ul>\n<li><strong>Inferential statistics<\/strong><\/li>\n<\/ul>\n<p>It is a step ahead of former. In inferential statistics, we draw conclusions or \u2018inferences\u2019 from our dataset. Also, a conclusion is drawn about the larger population from a data of a much smaller sample.<\/p>\n<p><strong>Example:\u00a0<\/strong>Central Limit Theorem, Hypothesis Testing, <em><strong><a href=\"https:\/\/data-flair.training\/blogs\/anova-in-r\/\">ANOVA<\/a><\/strong><\/em> are some of the inferential statistics techniques.<\/p>\n<h2>Types of Data in Statistics<\/h2>\n<p><span style=\"font-weight: 400\">Whenever we are working with statistics. It\u2019s very important to recognize the different types of data:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Numerical (discrete and continuous)<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Categorical<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Ordinal<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400\">Data is nothing but information that is gathered as a result of a survey.\u00a0<\/span><\/p>\n<p><b>Data can either be numerical or categorical in nature.<\/b><\/p>\n<h3>1. Numerical Data<\/h3>\n<p>It contains data that can be measured. A person\u2019s height, weight, IQ, or blood pressure are examples of Numerical Data.<\/p>\n<p><b>Numerical Data is again of two types &#8211;\u00a0<\/b><\/p>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Discrete <\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Continuous.<\/span><\/li>\n<\/ul>\n<p><b>a. Discrete data &#8211; <\/b>It represents items that can be counted. Basically, they take on possible values that can be listed out. The list of possible values may be fixed or it may go to infinity.<\/p>\n<p><b>b. Continuous data<\/b><span style=\"font-weight: 400\"> &#8211; It represents measurements. Also, their possible values cannot be counted. Although, it can only be described using intervals on the real number line.<\/span><\/p>\n<p><em><strong>Don&#8217;t forget to check the complete guide on <a href=\"https:\/\/data-flair.training\/blogs\/r-predictive-and-descriptive-analytics\/\">R predictive and Descriptive analytics<\/a><\/strong><\/em><\/p>\n<h3>2. Categorical Data<\/h3>\n<p>Categorical Data is used to represent characteristics that are present in the data such as a person\u2019s gender, marital status, hometown.<\/p>\n<p><strong>For example<\/strong>, in a given group of males and females, males can be represented as 0 and females can be represented as 1. Therefore, we have two classes of distinct characteristics.<\/p>\n<p><span style=\"font-weight: 400\">There is one more data called Ordinal Data. Let\u2019s begin to learn this &#8211;<\/span><\/p>\n<h3>3. Ordinal data<\/h3>\n<p>In this form of data, the variables have an ordered category which is natural and the distance between these variables is not known. Ordinal Data is similar to categorical data with the only difference that the data is ordered.<\/p>\n<p><strong>For example,\u00a0<\/strong>Rating a restaurant on a scale of 0 to 4 gives us ordinal data.<\/p>\n<p>They are often treated as categorical. We have to order the groups whenever it is required to create graphs and charts.<\/p>\n<p><em><strong>Must-read blog in R statistics &#8211; <a href=\"https:\/\/data-flair.training\/blogs\/chi-square-test\/\">The concept of\u00a0Chi-Square Test<\/a><\/strong><\/em><\/p>\n<h2>Distance Measures (Similarity, dissimilarity, correlation)<\/h2>\n<p><span style=\"font-weight: 400\">We consider it as mathematical approaches. Also, it helps us to measure the distance between the objects. Also, we use computing distance to compare the objects. Now, we can conclude three<\/span><b> different standpoints<\/b><span style=\"font-weight: 400\">\u00a0on the basis of comparison such as:<\/span><\/p>\n<ul>\n<li><span style=\"font-weight: 400\"><strong>Similarity-<\/strong>\u00a0A measure that ranges from 0 to 1 [0, 1]<\/span><\/li>\n<li><span style=\"font-weight: 400\"><strong>Dissimilarity-<\/strong>\u00a0It is measured that ranges from 0 to INF [0, Infinity]<\/span><\/li>\n<li><span style=\"font-weight: 400\"><strong>Correlation-<\/strong>\u00a0 It is measures that ranges from +1 to -1 [+1, -1]<\/span><\/li>\n<\/ul>\n<p>Now, to become a pro in statistics for R, you can&#8217;t miss learning the concept of correlation. So, let me tell you what exactly correlation is &#8211;<\/p>\n<h3>What is Correlation?<\/h3>\n<p>Correlation is a statistical technique for measuring the relationship between the two variables. It is of three types- Positive Correlation, Negative Correlation, and Zero Correlation.<\/p>\n<p>In a <strong>positive correlation<\/strong>, both variables increase and decrease together. Whereas, in a <strong>negative correlation<\/strong>, one variable increases and the other decreases. And, finally, in the case of zero correlation, there is no relation between the variables.<\/p>\n<p>Correlation is represented by \u2018r\u2019 and \u2018r\u2019 can range from -1 to +1.<\/p>\n<ul>\n<li>If r is close to 0, it means there is no relationship between the objects.<\/li>\n<li>When r is positive, it means that the value of one variable increases, the value of other variable increases.<\/li>\n<li>If r is negative means the value of one variable increases, the value of other variable decreases.<\/li>\n<\/ul>\n<p><em><strong>A Gentle Reminder!!! Don&#8217;t miss the opportunity to<a href=\"https:\/\/data-flair.training\/blogs\/survival-analysis-in-r\/\"> learn survival analysis<\/a> wit experts<\/strong><\/em><\/p>\n<h3>What is Pearson\u2019s Correlation Coefficient?<\/h3>\n<p>Pearson Correlation is used for measuring the linear relationship between the variables X and Y. The value of this coefficient is between +1 and -1. Pearson&#8217;s correlation coefficient is the covariance of the two variables divided by the product of their standard deviations.<\/p>\n<p><b>For example,\u00a0<\/b><span style=\"font-weight: 400\">age and blood pressure.<\/span><\/p>\n<p><b>Values of Pearson&#8217;s correlation coefficient<\/b><\/p>\n<p>The data in the continuous interval has a Pearson Correlation Coefficient ranging from -0.4 to +0.4<\/p>\n<p><span style=\"font-weight: 400\">Graphically correlations look like:<\/span><\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/12\/value-of-coefficient-pearson.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4969 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/12\/value-of-coefficient-pearson.png\" alt=\"R Statistics for Statistical Programming in R\" width=\"657\" height=\"290\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/12\/value-of-coefficient-pearson.png 657w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/12\/value-of-coefficient-pearson-150x66.png 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/12\/value-of-coefficient-pearson-300x132.png 300w\" sizes=\"auto, (max-width: 657px) 100vw, 657px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400\">If r = -0.4, data lie on a perfectly straight line with a negative slope.<\/span><\/p>\n<p><span style=\"font-weight: 400\">For r = +0.4, data lie on a perfectly straight line with a positive slope.<\/span><\/p>\n<p><span style=\"font-weight: 400\">When r = 0, no linear relationship between the variables.<\/span><\/p>\n<p><b>Positive correlation<\/b><span style=\"font-weight: 400\"> &#8211;\u00a0In this, both variables increase or decrease together.<\/span><\/p>\n<p><b>Negative correlation<\/b><span style=\"font-weight: 400\"> &#8211; In this correlation as one variable increases, so other decreases.<\/span><\/p>\n<p><em><strong>If you have any doubt regarding R concepts, reach out to our <a href=\"https:\/\/data-flair.training\/blogs\/r-tutorials-home\/\">Free R Tutorials Series<\/a>. Here you will find each and every concept related to R for FREE.\u00a0<\/strong><\/em><\/p>\n<h3>Formulas and Methods to Calculate Distance Measure<\/h3>\n<p>Now we will see different formulas that are used for calculating distance measure in Statistics for\u00a0 R &#8211;<\/p>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Euclidean distance<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Taxicab or Manhattan distance<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Minkowski<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Cosine similarity<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Mahalanobis distance<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Pearson\u2019s Correlation Coefficient (discussed above)<\/span><\/li>\n<\/ul>\n<p><b>a<\/b><span style=\"font-weight: 400\">.\u00a0<\/span><b>Euclidean Distance<\/b><span style=\"font-weight: 400\">\u00a0<\/span><\/p>\n<p>It is a classical method of computing the distance between the two points. These two points &#8211; A and B are said to be in the Euclidean Space.<\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/12\/ED-2.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4971\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/12\/ED-2.png\" alt=\"R Statistics for Statistical Programming in R\" width=\"301\" height=\"305\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/12\/ED-2.png 412w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/12\/ED-2-148x150.png 148w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/12\/ED-2-296x300.png 296w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/12\/ED-2-100x100.png 100w\" sizes=\"auto, (max-width: 301px) 100vw, 301px\" \/><\/a><\/p>\n<p>It can be used to measure distance in either a plane or a 3-D space. You can derive the Euclidean distance using <a href=\"https:\/\/en.wikipedia.org\/wiki\/Pythagorean_theorem\">Pythagoras Theorem<\/a>.<\/p>\n<p><b>b<\/b>.<b>Taxicab or Manhattan Distance<\/b><\/p>\n<div class=\"public-DraftStyleDefault-block public-DraftStyleDefault-ltr\">\n<p>This is similar to Euclidean Distance with only a single difference. The distance is calculated through traversing. Furthermore, the traversing is performed in vertical &amp; horizontal line in the grid-based system.<\/p>\n<p>Geographically we use it to measure the separation between building blocks in the city.<\/p>\n<p><b>For Example<\/b><span style=\"font-weight: 400\">:<\/span><\/p>\n<p><span style=\"font-weight: 400\">Manhattan distance used to calculate a distance between two points. Geographically we use it to separate by the building blocks in the city.<\/span><\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/12\/taxicab-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4972 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/12\/taxicab-1.png\" alt=\"R Statistics for Statistical Programming in R\" width=\"245\" height=\"57\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/12\/taxicab-1.png 245w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/12\/taxicab-1-150x35.png 150w\" sizes=\"auto, (max-width: 245px) 100vw, 245px\" \/><\/a><\/p>\n<\/div>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/12\/taxicab-2.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4973 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/12\/taxicab-2.png\" alt=\"R Statistics for Statistical Programming in R\" width=\"368\" height=\"321\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/12\/taxicab-2.png 368w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/12\/taxicab-2-150x131.png 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/12\/taxicab-2-300x262.png 300w\" sizes=\"auto, (max-width: 368px) 100vw, 368px\" \/><\/a><\/p>\n<p><b>Keywords<\/b><\/p>\n<p><span style=\"font-weight: 400\">visualization, manhattan<\/span><\/p>\n<p><em><strong>Want to master R Programming? You need to explore <a href=\"https:\/\/data-flair.training\/blogs\/data-analysis-software\/\">R data analysis tools<\/a>!<\/strong><\/em><\/p>\n<p><b>c<\/b><span style=\"font-weight: 400\">.\u00a0<\/span><b>Minkowski\u00a0<\/b><\/p>\n<p>This distance is a metric on Euclidean space. We can also<span class=\"passivevoice\">\u00a0consider it as\u00a0<\/span>s a generalization of\u00a0 Euclidean and Manhattan distance.<\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/12\/minkowski-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4974 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/12\/minkowski-1.png\" alt=\"R Statistics for Statistical Programming in R\" width=\"279\" height=\"111\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/12\/minkowski-1.png 279w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/12\/minkowski-1-150x60.png 150w\" sizes=\"auto, (max-width: 279px) 100vw, 279px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400\">Where r is a parameter.<\/span><\/p>\n<ul>\n<li><span style=\"font-weight: 400\">When r =1\u00a0<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400\">It tends to compute Manhattan distance.<\/span><\/p>\n<ul>\n<li><span style=\"font-weight: 400\">When r =2<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400\">It tends to compute Euclidean distance.<\/span><\/p>\n<ul>\n<li><span style=\"font-weight: 400\">When r =\u221e <\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400\">It tends to compute Supremum.<\/span><\/p>\n<p><b>d. Cosine Similarity<\/b><\/p>\n<p>It is a measure that calculates the cosine of the angle between two vectors. Basically, this metric is a measurement of orientation and not size.<br \/>\n<a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/12\/Cosine.png\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-4975 size-full aligncenter\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/12\/Cosine.png\" alt=\"R Statistics for Statistical Programming in R\" width=\"415\" height=\"88\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/12\/Cosine.png 415w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/12\/Cosine-150x32.png 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/12\/Cosine-300x64.png 300w\" sizes=\"auto, (max-width: 415px) 100vw, 415px\" \/><\/a><\/p>\n<div class=\"\">\n<p class=\"public-DraftStyleDefault-block public-DraftStyleDefault-ltr\"><b>e<\/b><span style=\"font-weight: 400\">.\u00a0<\/span><b><b>Mahalanobis distance\u00a0<\/b><\/b><\/p>\n<p class=\"public-DraftStyleDefault-block public-DraftStyleDefault-ltr\">Mahalanobis distance is a metric of measurement of the distance between two points in multivariate space. In cases of uncorrelated variables, the Euclidean Distance is equal to Mahalanobis Distance. However, if two or more variables are uncorrelated, then the axes are no longer at right angles. Therefore, plotting them in a regular 3D space becomes a problem.<\/p>\n<div class=\"\">\n<p>The Mahalanobis distance rectifies this problem and facilitates measurement, even between uncorrelated points in a multi-variable space. The formula for MD is as follows &#8211;<\/p>\n<\/div>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/12\/E-2.png\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-4977 size-full aligncenter\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/12\/E-2.png\" alt=\"R Statistics for Statistical Programming in R\" width=\"323\" height=\"76\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/12\/E-2.png 323w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/12\/E-2-150x35.png 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/12\/E-2-300x71.png 300w\" sizes=\"auto, (max-width: 323px) 100vw, 323px\" \/><\/a><\/p>\n<div class=\"public-DraftStyleDefault-block public-DraftStyleDefault-ltr\">\n<div class=\"\">\n<div class=\"public-DraftStyleDefault-block public-DraftStyleDefault-ltr\">\n<div class=\"mceTemp\"><\/div>\n<\/div>\n<\/div>\n<p><b>Keywords<\/b><br \/>\n<span style=\"font-weight: 400\">Mahalanobis distance<\/span><\/p>\n<p>So, this was all about the statistics and R concepts. Hope you understand all the formulas and methods. Still, if you face any trouble, ask in the comment section. We will definitely reply.<\/p>\n<p><em><strong>You should check what&#8217;s trending on DataFlair &#8211;<a href=\"https:\/\/data-flair.training\/blogs\/data-science-r-sentiment-analysis-project\/\"> Latest R project for freshers<\/a><\/strong><\/em><\/p>\n<\/div>\n<\/div>\n<p><span hidden class=\"__iawmlf-post-loop-links\" data-iawmlf-links=\"[{&quot;id&quot;:2174,&quot;href&quot;:&quot;https:\\\/\\\/en.wikipedia.org\\\/wiki\\\/Pythagorean_theorem&quot;,&quot;archived_href&quot;:&quot;http:\\\/\\\/web-wp.archive.org\\\/web\\\/20251207042209\\\/https:\\\/\\\/en.wikipedia.org\\\/wiki\\\/Pythagorean_theorem&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[{&quot;date&quot;:&quot;2025-12-11 01:38:17&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2025-12-14 11:11:21&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2025-12-31 09:23:39&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-01-05 07:51:45&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-01-11 14:44:04&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-01-17 08:53:24&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-01-24 22:37:16&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-11 14:14:49&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-18 16:51:52&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-25 21:56:01&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-03-04 11:46:00&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-17 09:36:21&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-25 05:40:19&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-29 23:37:09&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-03 06:21:22&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-06 11:49:44&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-09 17:27:24&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-13 01:33:40&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-16 21:10:22&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-05-04 17:15:46&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-05-09 14:42:29&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-05-14 08:56:03&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-05-24 08:30:13&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-06-10 02:42:51&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-06-15 13:23:57&quot;,&quot;http_code&quot;:200}],&quot;broken&quot;:false,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2026-06-15 13:23:57&quot;,&quot;http_code&quot;:200},&quot;process&quot;:&quot;done&quot;}]\"><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>&#8220;Statistics can be made to prove anything &#8211; Even the truth&#8221; Have you ever solved any statistics problem in just a few minutes? I bet you never did so. In fact, even I was&#46;&#46;&#46;<\/p>\n","protected":false},"author":5,"featured_media":65351,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[51],"tags":[20715,20716,20713,20714,16728,16729],"class_list":["post-4965","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-r","tag-correlation","tag-pearsons-correlation-coefficient","tag-r-and-statistics","tag-r-for-statistics","tag-r-statistics","tag-statistical-programming-in-r"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Statistics and R - Clear up your Stats problems with R Programming! - DataFlair<\/title>\n<meta name=\"description\" content=\"This blog on R statistics will give you the detail of all the statistical concepts that are required for R. Learn all the methods and formulas related to statistics\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/data-flair.training\/blogs\/r-statistics\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Statistics and R - Clear up your Stats problems with R Programming! - DataFlair\" \/>\n<meta property=\"og:description\" content=\"This blog on R statistics will give you the detail of all the statistical concepts that are required for R. Learn all the methods and formulas related to statistics\" \/>\n<meta property=\"og:url\" content=\"https:\/\/data-flair.training\/blogs\/r-statistics\/\" \/>\n<meta property=\"og:site_name\" content=\"DataFlair\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/DataFlairWS\/\" \/>\n<meta property=\"article:published_time\" content=\"2018-01-03T05:07:34+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-02-03T11:26:58+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/01\/R-Statistics.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"802\" \/>\n\t<meta property=\"og:image:height\" content=\"420\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"DataFlair Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:site\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"DataFlair Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Statistics and R - Clear up your Stats problems with R Programming! - DataFlair","description":"This blog on R statistics will give you the detail of all the statistical concepts that are required for R. Learn all the methods and formulas related to statistics","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/data-flair.training\/blogs\/r-statistics\/","og_locale":"en_US","og_type":"article","og_title":"Statistics and R - Clear up your Stats problems with R Programming! - DataFlair","og_description":"This blog on R statistics will give you the detail of all the statistical concepts that are required for R. Learn all the methods and formulas related to statistics","og_url":"https:\/\/data-flair.training\/blogs\/r-statistics\/","og_site_name":"DataFlair","article_publisher":"https:\/\/www.facebook.com\/DataFlairWS\/","article_published_time":"2018-01-03T05:07:34+00:00","article_modified_time":"2020-02-03T11:26:58+00:00","og_image":[{"width":802,"height":420,"url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/01\/R-Statistics.jpg","type":"image\/jpeg"}],"author":"DataFlair Team","twitter_card":"summary_large_image","twitter_creator":"@DataFlairWS","twitter_site":"@DataFlairWS","twitter_misc":{"Written by":"DataFlair Team","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/data-flair.training\/blogs\/r-statistics\/#article","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/r-statistics\/"},"author":{"name":"DataFlair Team","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/7f83c342f5d1632d6f7b4b0b0f447823"},"headline":"Statistics and R &#8211; Clear up your Stats problems with R Programming!","datePublished":"2018-01-03T05:07:34+00:00","dateModified":"2020-02-03T11:26:58+00:00","mainEntityOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/r-statistics\/"},"wordCount":1341,"commentCount":1,"publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/r-statistics\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/01\/R-Statistics.jpg","keywords":["correlation","pearson's correlation coefficient","R and Statistics","R for Statistics","R Statistics","Statistical Programming in R"],"articleSection":["R Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/data-flair.training\/blogs\/r-statistics\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/data-flair.training\/blogs\/r-statistics\/","url":"https:\/\/data-flair.training\/blogs\/r-statistics\/","name":"Statistics and R - Clear up your Stats problems with R Programming! - DataFlair","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/#website"},"primaryImageOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/r-statistics\/#primaryimage"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/r-statistics\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/01\/R-Statistics.jpg","datePublished":"2018-01-03T05:07:34+00:00","dateModified":"2020-02-03T11:26:58+00:00","description":"This blog on R statistics will give you the detail of all the statistical concepts that are required for R. Learn all the methods and formulas related to statistics","breadcrumb":{"@id":"https:\/\/data-flair.training\/blogs\/r-statistics\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/data-flair.training\/blogs\/r-statistics\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/r-statistics\/#primaryimage","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/01\/R-Statistics.jpg","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/01\/R-Statistics.jpg","width":802,"height":420,"caption":"R Statistics"},{"@type":"BreadcrumbList","@id":"https:\/\/data-flair.training\/blogs\/r-statistics\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog Home","item":"https:\/\/data-flair.training\/blogs\/"},{"@type":"ListItem","position":2,"name":"R Tutorials","item":"https:\/\/data-flair.training\/blogs\/category\/r\/"},{"@type":"ListItem","position":3,"name":"Statistics and R &#8211; Clear up your Stats problems with R Programming!"}]},{"@type":"WebSite","@id":"https:\/\/data-flair.training\/blogs\/#website","url":"https:\/\/data-flair.training\/blogs\/","name":"DataFlair","description":"Learn Today. Lead Tomorrow.","publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/data-flair.training\/blogs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/data-flair.training\/blogs\/#organization","name":"DataFlair","url":"https:\/\/data-flair.training\/blogs\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","width":106,"height":48,"caption":"DataFlair"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/DataFlairWS\/","https:\/\/x.com\/DataFlairWS","https:\/\/www.linkedin.com\/company\/dataflair-web-services-pvt-ltd\/","https:\/\/www.youtube.com\/user\/DataFlairWS"]},{"@type":"Person","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/7f83c342f5d1632d6f7b4b0b0f447823","name":"DataFlair Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/4cf3a74600d131330b8c481d519afd1574093ed89f6d3396a95393ad223eb7cd?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/4cf3a74600d131330b8c481d519afd1574093ed89f6d3396a95393ad223eb7cd?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/4cf3a74600d131330b8c481d519afd1574093ed89f6d3396a95393ad223eb7cd?s=96&d=mm&r=g","caption":"DataFlair Team"},"description":"DataFlair Team creates expert-level guides on programming, Java, Python, C++, DSA, AI, ML, data Science, Android, Flutter, MERN, Web Development, and technology. Our goal is to empower learners with easy-to-understand content. Explore our resources for career growth and practical learning.","url":"https:\/\/data-flair.training\/blogs\/author\/dfteam1\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/4965","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/comments?post=4965"}],"version-history":[{"count":12,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/4965\/revisions"}],"predecessor-version":[{"id":65354,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/4965\/revisions\/65354"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media\/65351"}],"wp:attachment":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media?parent=4965"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/categories?post=4965"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/tags?post=4965"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}