idx
int64 1
56k
| question
stringlengths 15
155
| answer
stringlengths 2
29.2k
⌀ | question_cut
stringlengths 15
100
| answer_cut
stringlengths 2
200
⌀ | conversation
stringlengths 47
29.3k
| conversation_cut
stringlengths 47
301
|
|---|---|---|---|---|---|---|
9,701
|
What R packages do you find most useful in your daily work?
|
Packages I often use are raster, sp, spatstat, vegan and splancs. I sometimes use ggplot2, tcltk and lattice.
|
What R packages do you find most useful in your daily work?
|
Packages I often use are raster, sp, spatstat, vegan and splancs. I sometimes use ggplot2, tcltk and lattice.
|
What R packages do you find most useful in your daily work?
Packages I often use are raster, sp, spatstat, vegan and splancs. I sometimes use ggplot2, tcltk and lattice.
|
What R packages do you find most useful in your daily work?
Packages I often use are raster, sp, spatstat, vegan and splancs. I sometimes use ggplot2, tcltk and lattice.
|
9,702
|
What R packages do you find most useful in your daily work?
|
For me personally, I use the following three packages the most, all available from the awesome Omega Project for Statistical Computing (I do not claim to be an expert, but for my purposes they are very easy to use):
RCurl: It has lots of options which allows access to websites that the default functions in base R would have difficulty with I think it's fair to say. It is an R-interface to the libcurl library, which has the added benefit of a whole community outside of R developing it. Also available on CRAN.
XML: It is very forgiving of parsing malformed XML/HTML. It is an R-interface to the libxml2 library and again has the added benefit of a whole community outside of R developing it Also available on CRAN.
RJSONIO: It allows one to parse the text returned from a json call and organise it into a list structure for further analysis.The competitor to this package is rjson but this one has the advantage of being vectorised, readily extensible through S3/S4, fast and scalable to large data.
|
What R packages do you find most useful in your daily work?
|
For me personally, I use the following three packages the most, all available from the awesome Omega Project for Statistical Computing (I do not claim to be an expert, but for my purposes they are ver
|
What R packages do you find most useful in your daily work?
For me personally, I use the following three packages the most, all available from the awesome Omega Project for Statistical Computing (I do not claim to be an expert, but for my purposes they are very easy to use):
RCurl: It has lots of options which allows access to websites that the default functions in base R would have difficulty with I think it's fair to say. It is an R-interface to the libcurl library, which has the added benefit of a whole community outside of R developing it. Also available on CRAN.
XML: It is very forgiving of parsing malformed XML/HTML. It is an R-interface to the libxml2 library and again has the added benefit of a whole community outside of R developing it Also available on CRAN.
RJSONIO: It allows one to parse the text returned from a json call and organise it into a list structure for further analysis.The competitor to this package is rjson but this one has the advantage of being vectorised, readily extensible through S3/S4, fast and scalable to large data.
|
What R packages do you find most useful in your daily work?
For me personally, I use the following three packages the most, all available from the awesome Omega Project for Statistical Computing (I do not claim to be an expert, but for my purposes they are ver
|
9,703
|
What R packages do you find most useful in your daily work?
|
Sweave lets you embed R code in a LaTeX document. The results of executing the code, and optionally the source code, become part of the final document.
So instead of, for example, pasting an image produced by R into a LaTeX file, you can paste the R code into the file and keep everything in one place.
|
What R packages do you find most useful in your daily work?
|
Sweave lets you embed R code in a LaTeX document. The results of executing the code, and optionally the source code, become part of the final document.
So instead of, for example, pasting an image pr
|
What R packages do you find most useful in your daily work?
Sweave lets you embed R code in a LaTeX document. The results of executing the code, and optionally the source code, become part of the final document.
So instead of, for example, pasting an image produced by R into a LaTeX file, you can paste the R code into the file and keep everything in one place.
|
What R packages do you find most useful in your daily work?
Sweave lets you embed R code in a LaTeX document. The results of executing the code, and optionally the source code, become part of the final document.
So instead of, for example, pasting an image pr
|
9,704
|
What R packages do you find most useful in your daily work?
|
I imagine graphics and data manipulation are two things that are useful no matter what you are doing. Thus, I'd recommend:
ggplot2 (great graphics)
lattice (great graphics)
plyr (useful for data manipulation)
Hmisc (good for descriptive statistics and much more)
|
What R packages do you find most useful in your daily work?
|
I imagine graphics and data manipulation are two things that are useful no matter what you are doing. Thus, I'd recommend:
ggplot2 (great graphics)
lattice (great graphics)
plyr (useful for data mani
|
What R packages do you find most useful in your daily work?
I imagine graphics and data manipulation are two things that are useful no matter what you are doing. Thus, I'd recommend:
ggplot2 (great graphics)
lattice (great graphics)
plyr (useful for data manipulation)
Hmisc (good for descriptive statistics and much more)
|
What R packages do you find most useful in your daily work?
I imagine graphics and data manipulation are two things that are useful no matter what you are doing. Thus, I'd recommend:
ggplot2 (great graphics)
lattice (great graphics)
plyr (useful for data mani
|
9,705
|
What R packages do you find most useful in your daily work?
|
zoo and xts are a must in my work!
|
What R packages do you find most useful in your daily work?
|
zoo and xts are a must in my work!
|
What R packages do you find most useful in your daily work?
zoo and xts are a must in my work!
|
What R packages do you find most useful in your daily work?
zoo and xts are a must in my work!
|
9,706
|
What R packages do you find most useful in your daily work?
|
I find lattice along with the companion book "Lattice: Multivariate Data Visualization with R" by Deepayan Sarkar invaluable.
|
What R packages do you find most useful in your daily work?
|
I find lattice along with the companion book "Lattice: Multivariate Data Visualization with R" by Deepayan Sarkar invaluable.
|
What R packages do you find most useful in your daily work?
I find lattice along with the companion book "Lattice: Multivariate Data Visualization with R" by Deepayan Sarkar invaluable.
|
What R packages do you find most useful in your daily work?
I find lattice along with the companion book "Lattice: Multivariate Data Visualization with R" by Deepayan Sarkar invaluable.
|
9,707
|
What R packages do you find most useful in your daily work?
|
You can get user reviews of packages on crantastic
|
What R packages do you find most useful in your daily work?
|
You can get user reviews of packages on crantastic
|
What R packages do you find most useful in your daily work?
You can get user reviews of packages on crantastic
|
What R packages do you find most useful in your daily work?
You can get user reviews of packages on crantastic
|
9,708
|
What R packages do you find most useful in your daily work?
|
I would suggest using some of the packages provided by revolution R. In particular, I quite like the:
multicore package for parallel computing using shared memory processors
there optimized packages for matrices
|
What R packages do you find most useful in your daily work?
|
I would suggest using some of the packages provided by revolution R. In particular, I quite like the:
multicore package for parallel computing using shared memory processors
there optimized packages
|
What R packages do you find most useful in your daily work?
I would suggest using some of the packages provided by revolution R. In particular, I quite like the:
multicore package for parallel computing using shared memory processors
there optimized packages for matrices
|
What R packages do you find most useful in your daily work?
I would suggest using some of the packages provided by revolution R. In particular, I quite like the:
multicore package for parallel computing using shared memory processors
there optimized packages
|
9,709
|
What R packages do you find most useful in your daily work?
|
If you are doing any kind of predictive modeling, caret is a godsend. Especially combined with the multicore package, some pretty amazing things are possible.
|
What R packages do you find most useful in your daily work?
|
If you are doing any kind of predictive modeling, caret is a godsend. Especially combined with the multicore package, some pretty amazing things are possible.
|
What R packages do you find most useful in your daily work?
If you are doing any kind of predictive modeling, caret is a godsend. Especially combined with the multicore package, some pretty amazing things are possible.
|
What R packages do you find most useful in your daily work?
If you are doing any kind of predictive modeling, caret is a godsend. Especially combined with the multicore package, some pretty amazing things are possible.
|
9,710
|
What R packages do you find most useful in your daily work?
|
Day-to-day the most useful package must be "foreign" which has functions for reading and writing data for other statistical packages e.g. Stata, SPSS, Minitab, SAS, etc. Working in a field where R is not that commonplace means that this is a very important package.
|
What R packages do you find most useful in your daily work?
|
Day-to-day the most useful package must be "foreign" which has functions for reading and writing data for other statistical packages e.g. Stata, SPSS, Minitab, SAS, etc. Working in a field where R is
|
What R packages do you find most useful in your daily work?
Day-to-day the most useful package must be "foreign" which has functions for reading and writing data for other statistical packages e.g. Stata, SPSS, Minitab, SAS, etc. Working in a field where R is not that commonplace means that this is a very important package.
|
What R packages do you find most useful in your daily work?
Day-to-day the most useful package must be "foreign" which has functions for reading and writing data for other statistical packages e.g. Stata, SPSS, Minitab, SAS, etc. Working in a field where R is
|
9,711
|
What R packages do you find most useful in your daily work?
|
I use
car, doBy, Epi, ggplot2, gregmisc (gdata, gmodels, gplots, gtools), Hmisc, plyr, RCurl, RDCOMClient, reshape, RODBC, TeachingDemos, XML.
a lot.
|
What R packages do you find most useful in your daily work?
|
I use
car, doBy, Epi, ggplot2, gregmisc (gdata, gmodels, gplots, gtools), Hmisc, plyr, RCurl, RDCOMClient, reshape, RODBC, TeachingDemos, XML.
a lot.
|
What R packages do you find most useful in your daily work?
I use
car, doBy, Epi, ggplot2, gregmisc (gdata, gmodels, gplots, gtools), Hmisc, plyr, RCurl, RDCOMClient, reshape, RODBC, TeachingDemos, XML.
a lot.
|
What R packages do you find most useful in your daily work?
I use
car, doBy, Epi, ggplot2, gregmisc (gdata, gmodels, gplots, gtools), Hmisc, plyr, RCurl, RDCOMClient, reshape, RODBC, TeachingDemos, XML.
a lot.
|
9,712
|
What R packages do you find most useful in your daily work?
|
This is definitely a question that doesn't have "an answer". It is completely dependent on what you want to do. That aside, I'll share the packages that I install as a standard with an R update...
install.packages(c("car","gregmisc","xtable","Design","Hmisc","psych",
"CCA", "fda", "zoo", "fields",
"catspec","sem","multilevel","Deducer","RQDA"))
and leave it to you to investigate those packages and see if they are valuable to you.
|
What R packages do you find most useful in your daily work?
|
This is definitely a question that doesn't have "an answer". It is completely dependent on what you want to do. That aside, I'll share the packages that I install as a standard with an R update...
i
|
What R packages do you find most useful in your daily work?
This is definitely a question that doesn't have "an answer". It is completely dependent on what you want to do. That aside, I'll share the packages that I install as a standard with an R update...
install.packages(c("car","gregmisc","xtable","Design","Hmisc","psych",
"CCA", "fda", "zoo", "fields",
"catspec","sem","multilevel","Deducer","RQDA"))
and leave it to you to investigate those packages and see if they are valuable to you.
|
What R packages do you find most useful in your daily work?
This is definitely a question that doesn't have "an answer". It is completely dependent on what you want to do. That aside, I'll share the packages that I install as a standard with an R update...
i
|
9,713
|
What R packages do you find most useful in your daily work?
|
You can also take a look at Task views on CRAN and see if something suit your needs. I agree with @Jeromy for these must-have packages (for data manipulation and plotting).
|
What R packages do you find most useful in your daily work?
|
You can also take a look at Task views on CRAN and see if something suit your needs. I agree with @Jeromy for these must-have packages (for data manipulation and plotting).
|
What R packages do you find most useful in your daily work?
You can also take a look at Task views on CRAN and see if something suit your needs. I agree with @Jeromy for these must-have packages (for data manipulation and plotting).
|
What R packages do you find most useful in your daily work?
You can also take a look at Task views on CRAN and see if something suit your needs. I agree with @Jeromy for these must-have packages (for data manipulation and plotting).
|
9,714
|
What R packages do you find most useful in your daily work?
|
If you are working with Latex, I recommend TikZ Device for outputting nice, Latex-formatted (like PSTricks) graphics. The output you get is text-based Latex code, which can be embedded with include(filename) into any figure environment.
Pros:
Same font in graphics as in your text
Professional look
Cons:
Takes longer to compile than PNG or PDF
for very complex R graphics, there are could be some display errors
https://github.com/Sharpie/RTikZDevice - Project, Packages available from CRAN and R-Forge
|
What R packages do you find most useful in your daily work?
|
If you are working with Latex, I recommend TikZ Device for outputting nice, Latex-formatted (like PSTricks) graphics. The output you get is text-based Latex code, which can be embedded with include(fi
|
What R packages do you find most useful in your daily work?
If you are working with Latex, I recommend TikZ Device for outputting nice, Latex-formatted (like PSTricks) graphics. The output you get is text-based Latex code, which can be embedded with include(filename) into any figure environment.
Pros:
Same font in graphics as in your text
Professional look
Cons:
Takes longer to compile than PNG or PDF
for very complex R graphics, there are could be some display errors
https://github.com/Sharpie/RTikZDevice - Project, Packages available from CRAN and R-Forge
|
What R packages do you find most useful in your daily work?
If you are working with Latex, I recommend TikZ Device for outputting nice, Latex-formatted (like PSTricks) graphics. The output you get is text-based Latex code, which can be embedded with include(fi
|
9,715
|
What R packages do you find most useful in your daily work?
|
I use lattice, ggplot2, lubridate, reshape, boot, e1071, car, forecast, and zoo a lot.
|
What R packages do you find most useful in your daily work?
|
I use lattice, ggplot2, lubridate, reshape, boot, e1071, car, forecast, and zoo a lot.
|
What R packages do you find most useful in your daily work?
I use lattice, ggplot2, lubridate, reshape, boot, e1071, car, forecast, and zoo a lot.
|
What R packages do you find most useful in your daily work?
I use lattice, ggplot2, lubridate, reshape, boot, e1071, car, forecast, and zoo a lot.
|
9,716
|
What R packages do you find most useful in your daily work?
|
I could not live without:
lattice for graphics
xlsx or XLConnect for reading Excel files
rtf to create reports in rtf format (I would prefer Sword or R2wd but I cannot install statconn at work; I will surely try odfWeave soon.)
nlme and lme4 for mixed models
ff for working with large arrays
|
What R packages do you find most useful in your daily work?
|
I could not live without:
lattice for graphics
xlsx or XLConnect for reading Excel files
rtf to create reports in rtf format (I would prefer Sword or R2wd but I cannot install statconn at work; I wil
|
What R packages do you find most useful in your daily work?
I could not live without:
lattice for graphics
xlsx or XLConnect for reading Excel files
rtf to create reports in rtf format (I would prefer Sword or R2wd but I cannot install statconn at work; I will surely try odfWeave soon.)
nlme and lme4 for mixed models
ff for working with large arrays
|
What R packages do you find most useful in your daily work?
I could not live without:
lattice for graphics
xlsx or XLConnect for reading Excel files
rtf to create reports in rtf format (I would prefer Sword or R2wd but I cannot install statconn at work; I wil
|
9,717
|
What R packages do you find most useful in your daily work?
|
I can recommend the new shiny based packages to everyone, it makes data visualisation and inspection interactive and thus easier than writing code in R espacially in the beginning.
A good example would be ggplotgui
|
What R packages do you find most useful in your daily work?
|
I can recommend the new shiny based packages to everyone, it makes data visualisation and inspection interactive and thus easier than writing code in R espacially in the beginning.
A good example woul
|
What R packages do you find most useful in your daily work?
I can recommend the new shiny based packages to everyone, it makes data visualisation and inspection interactive and thus easier than writing code in R espacially in the beginning.
A good example would be ggplotgui
|
What R packages do you find most useful in your daily work?
I can recommend the new shiny based packages to everyone, it makes data visualisation and inspection interactive and thus easier than writing code in R espacially in the beginning.
A good example woul
|
9,718
|
What R packages do you find most useful in your daily work?
|
RODBC for accessing data from databases, sqldf for performing simple SQL queries on dataframes (although I am forcing myself to use native R commands), and ggplot2 and plyr
|
What R packages do you find most useful in your daily work?
|
RODBC for accessing data from databases, sqldf for performing simple SQL queries on dataframes (although I am forcing myself to use native R commands), and ggplot2 and plyr
|
What R packages do you find most useful in your daily work?
RODBC for accessing data from databases, sqldf for performing simple SQL queries on dataframes (although I am forcing myself to use native R commands), and ggplot2 and plyr
|
What R packages do you find most useful in your daily work?
RODBC for accessing data from databases, sqldf for performing simple SQL queries on dataframes (although I am forcing myself to use native R commands), and ggplot2 and plyr
|
9,719
|
What R packages do you find most useful in your daily work?
|
I work with both R and MATLAB and I use R.matlab a lot to transfer data between the two.
|
What R packages do you find most useful in your daily work?
|
I work with both R and MATLAB and I use R.matlab a lot to transfer data between the two.
|
What R packages do you find most useful in your daily work?
I work with both R and MATLAB and I use R.matlab a lot to transfer data between the two.
|
What R packages do you find most useful in your daily work?
I work with both R and MATLAB and I use R.matlab a lot to transfer data between the two.
|
9,720
|
What R packages do you find most useful in your daily work?
|
We mostly use:
ggplot - for charts
stats
e1071 - for SVMs
|
What R packages do you find most useful in your daily work?
|
We mostly use:
ggplot - for charts
stats
e1071 - for SVMs
|
What R packages do you find most useful in your daily work?
We mostly use:
ggplot - for charts
stats
e1071 - for SVMs
|
What R packages do you find most useful in your daily work?
We mostly use:
ggplot - for charts
stats
e1071 - for SVMs
|
9,721
|
What R packages do you find most useful in your daily work?
|
lattice, car, MASS, foreign, party.
|
What R packages do you find most useful in your daily work?
|
lattice, car, MASS, foreign, party.
|
What R packages do you find most useful in your daily work?
lattice, car, MASS, foreign, party.
|
What R packages do you find most useful in your daily work?
lattice, car, MASS, foreign, party.
|
9,722
|
What R packages do you find most useful in your daily work?
|
For me
I am using kernlab for Kernel-based Machine Learning Lab and e1071 for SVM and ggplot2 for graphics
|
What R packages do you find most useful in your daily work?
|
For me
I am using kernlab for Kernel-based Machine Learning Lab and e1071 for SVM and ggplot2 for graphics
|
What R packages do you find most useful in your daily work?
For me
I am using kernlab for Kernel-based Machine Learning Lab and e1071 for SVM and ggplot2 for graphics
|
What R packages do you find most useful in your daily work?
For me
I am using kernlab for Kernel-based Machine Learning Lab and e1071 for SVM and ggplot2 for graphics
|
9,723
|
What R packages do you find most useful in your daily work?
|
I use
ggplot2, vegan and reshape quite often.
|
What R packages do you find most useful in your daily work?
|
I use
ggplot2, vegan and reshape quite often.
|
What R packages do you find most useful in your daily work?
I use
ggplot2, vegan and reshape quite often.
|
What R packages do you find most useful in your daily work?
I use
ggplot2, vegan and reshape quite often.
|
9,724
|
What do statisticians do that can't be automated?
|
@Adam, if you think of statistical researchers analogously to those in other fields - people who build upon the existing methodology and knowledge - then it might make it more clear that the answer to your first question is 'No'.
Statisticians that make a living from simply applying canned software packages could quite possibly be replaced by computers for every step except writing the discussion section of a paper where the results must be interpreted. So, in that sense, yes - it could be automated (although it would have to be a complicated piece of software that has one hell of a natural language processor).
However, as most researchers eventually figure out, the "canned" routines that people often use are pretty limited and must be modified (or new methods entirely must be developed) to answer specialized research questions - this is where the human aspect of statistics is indispensable. Or, a researcher must simply settle for a somewhat different, but related, research question that can be answered using classical methods.
Most statisticians I know work in research jobs (e.g. professors, research scientists) where their primary role is to develop new methodology. If this process could be automated, meaning that a computer can formulate and crank out useful new methodology, then I'm afraid researchers in every field would be obsolete.
|
What do statisticians do that can't be automated?
|
@Adam, if you think of statistical researchers analogously to those in other fields - people who build upon the existing methodology and knowledge - then it might make it more clear that the answer to
|
What do statisticians do that can't be automated?
@Adam, if you think of statistical researchers analogously to those in other fields - people who build upon the existing methodology and knowledge - then it might make it more clear that the answer to your first question is 'No'.
Statisticians that make a living from simply applying canned software packages could quite possibly be replaced by computers for every step except writing the discussion section of a paper where the results must be interpreted. So, in that sense, yes - it could be automated (although it would have to be a complicated piece of software that has one hell of a natural language processor).
However, as most researchers eventually figure out, the "canned" routines that people often use are pretty limited and must be modified (or new methods entirely must be developed) to answer specialized research questions - this is where the human aspect of statistics is indispensable. Or, a researcher must simply settle for a somewhat different, but related, research question that can be answered using classical methods.
Most statisticians I know work in research jobs (e.g. professors, research scientists) where their primary role is to develop new methodology. If this process could be automated, meaning that a computer can formulate and crank out useful new methodology, then I'm afraid researchers in every field would be obsolete.
|
What do statisticians do that can't be automated?
@Adam, if you think of statistical researchers analogously to those in other fields - people who build upon the existing methodology and knowledge - then it might make it more clear that the answer to
|
9,725
|
What do statisticians do that can't be automated?
|
Computers will only make statisticians obsolete when strong AI makes humans as a whole obsolete.
The question reminds me of the question about, "If there are all of these robust statistical methods, why do people still use other methods?" Some of the answer is habit and training, but much of it is that the question is naive: "robust" doesn't mean "you don't have to think about and understand what you're doing", as the question implies.
I mean, you could download the R statistics package today, and be doing any basic statistical technique by nightfall. You could then download a couple of packages and start using methods so esoteric that most of us haven't even heard of them. The question is: would you get reasonable answers? The answer is: probably not.
The algorithms are automated, but you still have to make many judgement calls all along the investigative path: from the plan of attack to the final judgement of whether the results actually make sense. To get to that point, you're really talking about Star-Trek-like computers where you can say, "Computer, tell me...", by which point pretty much every human vocation is obsolete.
|
What do statisticians do that can't be automated?
|
Computers will only make statisticians obsolete when strong AI makes humans as a whole obsolete.
The question reminds me of the question about, "If there are all of these robust statistical methods, w
|
What do statisticians do that can't be automated?
Computers will only make statisticians obsolete when strong AI makes humans as a whole obsolete.
The question reminds me of the question about, "If there are all of these robust statistical methods, why do people still use other methods?" Some of the answer is habit and training, but much of it is that the question is naive: "robust" doesn't mean "you don't have to think about and understand what you're doing", as the question implies.
I mean, you could download the R statistics package today, and be doing any basic statistical technique by nightfall. You could then download a couple of packages and start using methods so esoteric that most of us haven't even heard of them. The question is: would you get reasonable answers? The answer is: probably not.
The algorithms are automated, but you still have to make many judgement calls all along the investigative path: from the plan of attack to the final judgement of whether the results actually make sense. To get to that point, you're really talking about Star-Trek-like computers where you can say, "Computer, tell me...", by which point pretty much every human vocation is obsolete.
|
What do statisticians do that can't be automated?
Computers will only make statisticians obsolete when strong AI makes humans as a whole obsolete.
The question reminds me of the question about, "If there are all of these robust statistical methods, w
|
9,726
|
What do statisticians do that can't be automated?
|
What can a statistician do that a computer can't? Write the original program they get replaced by.
Beyond that somewhat silly answer, the root of the question is ignoring the actual science of statistics in favor of its mechanics, and entirely discounting the role of the creative process in statistical analysis. This is, to use Peter Flom's car example, like saying cars are built using rivets and welds, so there's no reason the new Mustang couldn't be designed by riveting and welding robots.
A tremendous amount of the doing of statistics involves subject-matter expertise, judgement calls, and creativity. "Canned" analysis running from an algorithm often won't get you the best answer, and there are myriad documented examples where using automated methods actually gives you the wrong answer - or at least not the answer you think you're getting. The use of stepwise p-value based variable selection procedures and analysis based on purely numerically defined quantiles are two I'm most familiar with, but I'm sure you can find a wealth of others out there.
Even if all that was still somehow automated, there is the matter of interpreting results. The statistician (or statistically-inclined scientist)'s job isn't done when you obtain a regression coefficient or p-value. What does that finding mean. What are the caveats? What does this represent in the context of what's come before?
Finally, you have the development of new methods. Statistics isn't something that was simply laid out long ago by people whose names we recognize - Fisher, Cox, etc. It's an evolving field, and you can't program a new method into a computer until a person develops the method itself.
|
What do statisticians do that can't be automated?
|
What can a statistician do that a computer can't? Write the original program they get replaced by.
Beyond that somewhat silly answer, the root of the question is ignoring the actual science of statist
|
What do statisticians do that can't be automated?
What can a statistician do that a computer can't? Write the original program they get replaced by.
Beyond that somewhat silly answer, the root of the question is ignoring the actual science of statistics in favor of its mechanics, and entirely discounting the role of the creative process in statistical analysis. This is, to use Peter Flom's car example, like saying cars are built using rivets and welds, so there's no reason the new Mustang couldn't be designed by riveting and welding robots.
A tremendous amount of the doing of statistics involves subject-matter expertise, judgement calls, and creativity. "Canned" analysis running from an algorithm often won't get you the best answer, and there are myriad documented examples where using automated methods actually gives you the wrong answer - or at least not the answer you think you're getting. The use of stepwise p-value based variable selection procedures and analysis based on purely numerically defined quantiles are two I'm most familiar with, but I'm sure you can find a wealth of others out there.
Even if all that was still somehow automated, there is the matter of interpreting results. The statistician (or statistically-inclined scientist)'s job isn't done when you obtain a regression coefficient or p-value. What does that finding mean. What are the caveats? What does this represent in the context of what's come before?
Finally, you have the development of new methods. Statistics isn't something that was simply laid out long ago by people whose names we recognize - Fisher, Cox, etc. It's an evolving field, and you can't program a new method into a computer until a person develops the method itself.
|
What do statisticians do that can't be automated?
What can a statistician do that a computer can't? Write the original program they get replaced by.
Beyond that somewhat silly answer, the root of the question is ignoring the actual science of statist
|
9,727
|
What do statisticians do that can't be automated?
|
Another way to interpret this question might be: "has the rapid increase in automated statistical techniques in recent years corresponded with a decreased demand in jobs for dedicated statisticians and data analysts?"
We can address this question by looking at the data
Data courtesy of indeed.com & revolutions blog
|
What do statisticians do that can't be automated?
|
Another way to interpret this question might be: "has the rapid increase in automated statistical techniques in recent years corresponded with a decreased demand in jobs for dedicated statisticians an
|
What do statisticians do that can't be automated?
Another way to interpret this question might be: "has the rapid increase in automated statistical techniques in recent years corresponded with a decreased demand in jobs for dedicated statisticians and data analysts?"
We can address this question by looking at the data
Data courtesy of indeed.com & revolutions blog
|
What do statisticians do that can't be automated?
Another way to interpret this question might be: "has the rapid increase in automated statistical techniques in recent years corresponded with a decreased demand in jobs for dedicated statisticians an
|
9,728
|
What do statisticians do that can't be automated?
|
I don't entirely agree with the premise of the question, i.e. I think there is no way in which computers could ever hope to replace statisticians, but to put a concrete example to why I think that:
The work which statisticians do with scientists, particularly, in the design and interpretation of experiments, requires not only a human mind but even a philosophical bent which it is inconceivable that computers could ever show.
Unless we end up in some sort of Skynet type situation, of course, in which case I reckon all bets are probably off as far as the future of all humanity, never mind about just the statisticians, is concerned :-)
|
What do statisticians do that can't be automated?
|
I don't entirely agree with the premise of the question, i.e. I think there is no way in which computers could ever hope to replace statisticians, but to put a concrete example to why I think that:
Th
|
What do statisticians do that can't be automated?
I don't entirely agree with the premise of the question, i.e. I think there is no way in which computers could ever hope to replace statisticians, but to put a concrete example to why I think that:
The work which statisticians do with scientists, particularly, in the design and interpretation of experiments, requires not only a human mind but even a philosophical bent which it is inconceivable that computers could ever show.
Unless we end up in some sort of Skynet type situation, of course, in which case I reckon all bets are probably off as far as the future of all humanity, never mind about just the statisticians, is concerned :-)
|
What do statisticians do that can't be automated?
I don't entirely agree with the premise of the question, i.e. I think there is no way in which computers could ever hope to replace statisticians, but to put a concrete example to why I think that:
Th
|
9,729
|
What do statisticians do that can't be automated?
|
The question suggests a naive view of a statistician-—that it's all about checking to see if a p < 0.05 and reporting some numbers and standard graphs. If that's what you mean by statistician then you are correct in your implication that much of it could be entirely automated. But that's not what statistician means.
Define your term statistician though, and you might get better answers.
|
What do statisticians do that can't be automated?
|
The question suggests a naive view of a statistician-—that it's all about checking to see if a p < 0.05 and reporting some numbers and standard graphs. If that's what you mean by statistician then yo
|
What do statisticians do that can't be automated?
The question suggests a naive view of a statistician-—that it's all about checking to see if a p < 0.05 and reporting some numbers and standard graphs. If that's what you mean by statistician then you are correct in your implication that much of it could be entirely automated. But that's not what statistician means.
Define your term statistician though, and you might get better answers.
|
What do statisticians do that can't be automated?
The question suggests a naive view of a statistician-—that it's all about checking to see if a p < 0.05 and reporting some numbers and standard graphs. If that's what you mean by statistician then yo
|
9,730
|
What do statisticians do that can't be automated?
|
Loading a statistics package onto your computer doesn't make you a statistician any more than buying a car makes you able to drive.
Even if the statistician just applies "canned" routines there are lots of questions.
Which routine? What routine will answer the client's questions?
With what variables? and should they be transformed? Should some levels be combined? Which should be forced into a model?
With what data? Should outliers be deleted? Trimmed? Maybe a robust method?
and so on.
But the job starts way before the computer is turned on, and ends long after the statistical package is turned off.
Before:
What does the client want to do? Often this is a lot of work!
What data does the client have? Oy vey! The variables are labeled V1 to V828171 Which are which?
What is the state of the literature?
What will the client expect? How technical should it be?
After:
What do results mean? (and not just "this means that the regression is significant")
How should the results be explained to the client?
What other questions do the results raise?
It will, I think, be a long time before computers can do this.
|
What do statisticians do that can't be automated?
|
Loading a statistics package onto your computer doesn't make you a statistician any more than buying a car makes you able to drive.
Even if the statistician just applies "canned" routines there are lo
|
What do statisticians do that can't be automated?
Loading a statistics package onto your computer doesn't make you a statistician any more than buying a car makes you able to drive.
Even if the statistician just applies "canned" routines there are lots of questions.
Which routine? What routine will answer the client's questions?
With what variables? and should they be transformed? Should some levels be combined? Which should be forced into a model?
With what data? Should outliers be deleted? Trimmed? Maybe a robust method?
and so on.
But the job starts way before the computer is turned on, and ends long after the statistical package is turned off.
Before:
What does the client want to do? Often this is a lot of work!
What data does the client have? Oy vey! The variables are labeled V1 to V828171 Which are which?
What is the state of the literature?
What will the client expect? How technical should it be?
After:
What do results mean? (and not just "this means that the regression is significant")
How should the results be explained to the client?
What other questions do the results raise?
It will, I think, be a long time before computers can do this.
|
What do statisticians do that can't be automated?
Loading a statistics package onto your computer doesn't make you a statistician any more than buying a car makes you able to drive.
Even if the statistician just applies "canned" routines there are lo
|
9,731
|
What do statisticians do that can't be automated?
|
Academic studies which look at the probability of automation of different occupations or task do not think that statisticians will be soon substituted by computers. See for example the controversial Frey & Osborne (2013) study which ranks occupations according to their probability of computerization, statisticians are ranked low 213 out of 702 with a probability of 22% (see table in the appendix). If you are further interested, see also the Slate article here.
Arntz et al. (2016) (here an The Economist article) look at tasks rather than occupations for the European Union and come to a similar conclusion: Doing "Complex Math or Statistics" is statistically significantly negatively related to job automatibilty (see Table 3).
But some caution is advisable, academics and/or economists have not always been very good in predicting the future (the Nobel laureate Robert Lucas for example concluded in 2003, a few years before the financial crises, that the "central problem of depression prevention as been solved, for all practical purposes, and has in fact been solved for many decades."). Both studies appear to be working paper, which are widely discussed but have not been published in standard peer-reviewed journals.
Regarding the academic debate, here you can find an overview article about the state of research about automation.
|
What do statisticians do that can't be automated?
|
Academic studies which look at the probability of automation of different occupations or task do not think that statisticians will be soon substituted by computers. See for example the controversial F
|
What do statisticians do that can't be automated?
Academic studies which look at the probability of automation of different occupations or task do not think that statisticians will be soon substituted by computers. See for example the controversial Frey & Osborne (2013) study which ranks occupations according to their probability of computerization, statisticians are ranked low 213 out of 702 with a probability of 22% (see table in the appendix). If you are further interested, see also the Slate article here.
Arntz et al. (2016) (here an The Economist article) look at tasks rather than occupations for the European Union and come to a similar conclusion: Doing "Complex Math or Statistics" is statistically significantly negatively related to job automatibilty (see Table 3).
But some caution is advisable, academics and/or economists have not always been very good in predicting the future (the Nobel laureate Robert Lucas for example concluded in 2003, a few years before the financial crises, that the "central problem of depression prevention as been solved, for all practical purposes, and has in fact been solved for many decades."). Both studies appear to be working paper, which are widely discussed but have not been published in standard peer-reviewed journals.
Regarding the academic debate, here you can find an overview article about the state of research about automation.
|
What do statisticians do that can't be automated?
Academic studies which look at the probability of automation of different occupations or task do not think that statisticians will be soon substituted by computers. See for example the controversial F
|
9,732
|
What do statisticians do that can't be automated?
|
I think that AI will only make statisticians smarter and more competitive. Why? Because this is the intent of artificial intelligence since their conception many decades ago...
|
What do statisticians do that can't be automated?
|
I think that AI will only make statisticians smarter and more competitive. Why? Because this is the intent of artificial intelligence since their conception many decades ago...
|
What do statisticians do that can't be automated?
I think that AI will only make statisticians smarter and more competitive. Why? Because this is the intent of artificial intelligence since their conception many decades ago...
|
What do statisticians do that can't be automated?
I think that AI will only make statisticians smarter and more competitive. Why? Because this is the intent of artificial intelligence since their conception many decades ago...
|
9,733
|
Understanding t-test for linear regression
|
You're probably thinking of the two sample $t$ test because that's often the first place the $t$ distribution comes up. But really all a $t$ test means is that the reference distribution for the test statistic is a $t$ distribution. If $Z \sim \mathcal N(0,1)$ and $S^2 \sim \chi^2_d$ with $Z$ and $S^2$ independent, then
$$
\frac{Z}{\sqrt{S^2 / d}} \sim t_d
$$
by definition. I'm writing this out to emphasize that the $t$ distribution is just a name that was given to the distribution of this ratio because it comes up a lot, and anything of this form will have a $t$ distribution. For the two sample t test, this ratio appears because under the null the difference in means is a zero-mean Gaussian and the variance estimate for independent Gaussians is an independent $\chi^2$ (the independence can be shown via Basu's theorem which uses the fact that the standard variance estimate in a Gaussian sample is ancillary to the population mean, while the sample mean is complete and sufficient for that same quantity).
With linear regression we basically get the same thing. In vector form, $\hat \beta \sim \mathcal N(\beta, \sigma^2 (X^T X)^{-1})$. Let $S^2_j = (X^T X)^{-1}_{jj}$ and assume the predictors $X$ are non-random. If we knew $\sigma^2$ we'd have
$$
\frac{\hat \beta_j - 0}{\sigma S_j} \sim \mathcal N(0, 1)
$$
under the null $H_0 : \beta_j = 0$ so we'd actually have a Z test. But once we estimate $\sigma^2$ we end up with a $\chi^2$ random variable that, under our normality assumptions, turns out to be independent of our statistic $\hat \beta_j$ and then we get a $t$ distribution.
Here's the details of that: assume $y \sim \mathcal N(X\beta, \sigma^2 I)$. Letting $H = X(X^TX)^{-1}X^T$ be the hat matrix we have
$$
\|e\|^2 = \|(I-H)y\|^2 = y^T(I-H)y.
$$
$H$ is idempotent so we have the really nice result that
$$
y^T(I-H)y / \sigma^2 \sim \mathcal \chi_{n-p}^2(\delta)
$$
with non-centrality parameter $\delta = \beta^TX^T(I-H)X\beta = \beta^T(X^TX - X^T X)\beta = 0$, so actually this is a central $\chi^2$ with $n-p$ degrees of freedom (this is a special case of Cochran's theorem). I'm using $p$ to denote the number of columns of $X$, so if one column of $X$ gives the intercept then we'd have $p-1$ non-intercept predictors. Some authors use $p$ to be the number of non-intercept predictors so sometimes you might see something like $n-p-1$ in the degrees of freedom there, but it's all the same thing.
The result of this is that $E(e^Te / \sigma^2) = n-p$, so $\hat \sigma^2 := \frac{1}{n-p} e^T e$ works great as an estimator of $\sigma^2$.
This means that
$$
\frac{\hat \beta_j}{\hat \sigma S_j}= \frac{\hat \beta_j}{S_j\sqrt{e^Te / (n-p)}} = \frac{\hat \beta_j}{\sigma S_j\sqrt{\frac{e^Te}{\sigma^2(n-p)}}}
$$
is the ratio of a standard Gaussian to a chi squared divided by its degrees of freedom. To finish this, we need to show independence and we can use the following result:
Result: for $Z \sim \mathcal N_k(\mu, \Sigma)$ and matrices $A$ and $B$ in $\mathbb R^{l\times k}$ and $\mathbb R^{m\times k}$ respectively, $AZ$ and $BZ$ are independent if and only if $A\Sigma B^T = 0$ (this is exercise 58(b) in chapter 1 of Jun Shao's Mathematical Statistics).
We have $\hat \beta = (X^TX)^{-1}X^T y$ and $e = (I-H)y$ where $y \sim \mathcal N(X\beta, \sigma^2 I)$. This means
$$
(X^TX)^{-1}X^T \cdot \sigma^2 I \cdot (I-H)^T = \sigma^2 \left((X^TX)^{-1}X^T - (X^TX)^{-1}X^TX(X^TX)^{-1}X^T\right) = 0
$$
so $\hat \beta \perp e$, and therefore $\hat \beta \perp e^T e$.
The upshot is we now know
$$
\frac{\hat \beta_j}{\hat \sigma S_j} \sim t_{n-p}
$$
as desired (under all of the above assumptions).
Here's the proof of that result. Let $C = {A \choose B}$ be the $(l+m)\times k$ matrix formed by stacking $A$ on top of $B$. Then
$$
CZ = {AZ \choose BZ} \sim \mathcal N \left({A\mu \choose B\mu}, C\Sigma C^T \right)
$$
where
$$
C\Sigma C^T = {A \choose B} \Sigma \left(\begin{array}{cc} A^T & B^T \end{array}\right) = \left(\begin{array}{cc}A\Sigma A^T & A\Sigma B^T \\ B\Sigma A^T & B\Sigma B^T\end{array}\right).
$$
$CZ$ is a multivariate Gaussian and it is a well-known result that two components of a multivariate Gaussian are independent if and only if they are uncorrelated, so the condition $A\Sigma B^T = 0$ turns out to be exactly equivalent to the components $AZ$ and $BZ$ in $CZ$ being uncorrelated.
$\square$
|
Understanding t-test for linear regression
|
You're probably thinking of the two sample $t$ test because that's often the first place the $t$ distribution comes up. But really all a $t$ test means is that the reference distribution for the test
|
Understanding t-test for linear regression
You're probably thinking of the two sample $t$ test because that's often the first place the $t$ distribution comes up. But really all a $t$ test means is that the reference distribution for the test statistic is a $t$ distribution. If $Z \sim \mathcal N(0,1)$ and $S^2 \sim \chi^2_d$ with $Z$ and $S^2$ independent, then
$$
\frac{Z}{\sqrt{S^2 / d}} \sim t_d
$$
by definition. I'm writing this out to emphasize that the $t$ distribution is just a name that was given to the distribution of this ratio because it comes up a lot, and anything of this form will have a $t$ distribution. For the two sample t test, this ratio appears because under the null the difference in means is a zero-mean Gaussian and the variance estimate for independent Gaussians is an independent $\chi^2$ (the independence can be shown via Basu's theorem which uses the fact that the standard variance estimate in a Gaussian sample is ancillary to the population mean, while the sample mean is complete and sufficient for that same quantity).
With linear regression we basically get the same thing. In vector form, $\hat \beta \sim \mathcal N(\beta, \sigma^2 (X^T X)^{-1})$. Let $S^2_j = (X^T X)^{-1}_{jj}$ and assume the predictors $X$ are non-random. If we knew $\sigma^2$ we'd have
$$
\frac{\hat \beta_j - 0}{\sigma S_j} \sim \mathcal N(0, 1)
$$
under the null $H_0 : \beta_j = 0$ so we'd actually have a Z test. But once we estimate $\sigma^2$ we end up with a $\chi^2$ random variable that, under our normality assumptions, turns out to be independent of our statistic $\hat \beta_j$ and then we get a $t$ distribution.
Here's the details of that: assume $y \sim \mathcal N(X\beta, \sigma^2 I)$. Letting $H = X(X^TX)^{-1}X^T$ be the hat matrix we have
$$
\|e\|^2 = \|(I-H)y\|^2 = y^T(I-H)y.
$$
$H$ is idempotent so we have the really nice result that
$$
y^T(I-H)y / \sigma^2 \sim \mathcal \chi_{n-p}^2(\delta)
$$
with non-centrality parameter $\delta = \beta^TX^T(I-H)X\beta = \beta^T(X^TX - X^T X)\beta = 0$, so actually this is a central $\chi^2$ with $n-p$ degrees of freedom (this is a special case of Cochran's theorem). I'm using $p$ to denote the number of columns of $X$, so if one column of $X$ gives the intercept then we'd have $p-1$ non-intercept predictors. Some authors use $p$ to be the number of non-intercept predictors so sometimes you might see something like $n-p-1$ in the degrees of freedom there, but it's all the same thing.
The result of this is that $E(e^Te / \sigma^2) = n-p$, so $\hat \sigma^2 := \frac{1}{n-p} e^T e$ works great as an estimator of $\sigma^2$.
This means that
$$
\frac{\hat \beta_j}{\hat \sigma S_j}= \frac{\hat \beta_j}{S_j\sqrt{e^Te / (n-p)}} = \frac{\hat \beta_j}{\sigma S_j\sqrt{\frac{e^Te}{\sigma^2(n-p)}}}
$$
is the ratio of a standard Gaussian to a chi squared divided by its degrees of freedom. To finish this, we need to show independence and we can use the following result:
Result: for $Z \sim \mathcal N_k(\mu, \Sigma)$ and matrices $A$ and $B$ in $\mathbb R^{l\times k}$ and $\mathbb R^{m\times k}$ respectively, $AZ$ and $BZ$ are independent if and only if $A\Sigma B^T = 0$ (this is exercise 58(b) in chapter 1 of Jun Shao's Mathematical Statistics).
We have $\hat \beta = (X^TX)^{-1}X^T y$ and $e = (I-H)y$ where $y \sim \mathcal N(X\beta, \sigma^2 I)$. This means
$$
(X^TX)^{-1}X^T \cdot \sigma^2 I \cdot (I-H)^T = \sigma^2 \left((X^TX)^{-1}X^T - (X^TX)^{-1}X^TX(X^TX)^{-1}X^T\right) = 0
$$
so $\hat \beta \perp e$, and therefore $\hat \beta \perp e^T e$.
The upshot is we now know
$$
\frac{\hat \beta_j}{\hat \sigma S_j} \sim t_{n-p}
$$
as desired (under all of the above assumptions).
Here's the proof of that result. Let $C = {A \choose B}$ be the $(l+m)\times k$ matrix formed by stacking $A$ on top of $B$. Then
$$
CZ = {AZ \choose BZ} \sim \mathcal N \left({A\mu \choose B\mu}, C\Sigma C^T \right)
$$
where
$$
C\Sigma C^T = {A \choose B} \Sigma \left(\begin{array}{cc} A^T & B^T \end{array}\right) = \left(\begin{array}{cc}A\Sigma A^T & A\Sigma B^T \\ B\Sigma A^T & B\Sigma B^T\end{array}\right).
$$
$CZ$ is a multivariate Gaussian and it is a well-known result that two components of a multivariate Gaussian are independent if and only if they are uncorrelated, so the condition $A\Sigma B^T = 0$ turns out to be exactly equivalent to the components $AZ$ and $BZ$ in $CZ$ being uncorrelated.
$\square$
|
Understanding t-test for linear regression
You're probably thinking of the two sample $t$ test because that's often the first place the $t$ distribution comes up. But really all a $t$ test means is that the reference distribution for the test
|
9,734
|
Understanding t-test for linear regression
|
@Chaconne's answer is great. But here is a much shorter nonmathematical version!
Since the goal is to compute a P value, you first need to define a null hypothesis. Almost always, that is that the slope is actually horizontal so the numerical value for the slope (beta) is 0.0.
The slope fit from your data is not 0.0. Is that discrepancy due to random chance or due to the null hypothesis being wrong? You can't ever answer that for sure, but a P value is one way to sort-of-kind-of get at an answer.
The regression program reports a standard error of the slope. Compute the t ratio as the slope divided by its standard error. Actually, it is (slope minus null hypothesis slope) divided by the standard error, but the null hypothesis slope is nearly always zero.
Now you have a t ratio. The number of degrees of freedom (df) equals the number of data points minus the number of parameters fit by the regression (two for linear regression).
With those values (t and df) you can determine the P value with an online calculator or table.
It is essentially a one-sample t-test, comparing an observed computed value (the slope) with a hypothetical value (the null hypothesis).
|
Understanding t-test for linear regression
|
@Chaconne's answer is great. But here is a much shorter nonmathematical version!
Since the goal is to compute a P value, you first need to define a null hypothesis. Almost always, that is that the slo
|
Understanding t-test for linear regression
@Chaconne's answer is great. But here is a much shorter nonmathematical version!
Since the goal is to compute a P value, you first need to define a null hypothesis. Almost always, that is that the slope is actually horizontal so the numerical value for the slope (beta) is 0.0.
The slope fit from your data is not 0.0. Is that discrepancy due to random chance or due to the null hypothesis being wrong? You can't ever answer that for sure, but a P value is one way to sort-of-kind-of get at an answer.
The regression program reports a standard error of the slope. Compute the t ratio as the slope divided by its standard error. Actually, it is (slope minus null hypothesis slope) divided by the standard error, but the null hypothesis slope is nearly always zero.
Now you have a t ratio. The number of degrees of freedom (df) equals the number of data points minus the number of parameters fit by the regression (two for linear regression).
With those values (t and df) you can determine the P value with an online calculator or table.
It is essentially a one-sample t-test, comparing an observed computed value (the slope) with a hypothetical value (the null hypothesis).
|
Understanding t-test for linear regression
@Chaconne's answer is great. But here is a much shorter nonmathematical version!
Since the goal is to compute a P value, you first need to define a null hypothesis. Almost always, that is that the slo
|
9,735
|
Understanding t-test for linear regression
|
The coefficient estimates the effect of the corresponding IV on the DV; the standard error of that coefficient estimates the average error in that coefficient's estimates; the t-test tells you how many times larger the coefficient itself is than the average error of the values it estimates.
If y'=30x, but the observed values also vary on average by 30x from the predicted values, then the coefficient would only be consistent with wholly random differences between the predicted and observed values. The t-test tells us how many times larger the coefficient is from that error.
This is consistent with other applications of a t-test; a t-test of two samples of data tells you how many times larger the difference between the sample groups' means are than the variation within the samples.
|
Understanding t-test for linear regression
|
The coefficient estimates the effect of the corresponding IV on the DV; the standard error of that coefficient estimates the average error in that coefficient's estimates; the t-test tells you how man
|
Understanding t-test for linear regression
The coefficient estimates the effect of the corresponding IV on the DV; the standard error of that coefficient estimates the average error in that coefficient's estimates; the t-test tells you how many times larger the coefficient itself is than the average error of the values it estimates.
If y'=30x, but the observed values also vary on average by 30x from the predicted values, then the coefficient would only be consistent with wholly random differences between the predicted and observed values. The t-test tells us how many times larger the coefficient is from that error.
This is consistent with other applications of a t-test; a t-test of two samples of data tells you how many times larger the difference between the sample groups' means are than the variation within the samples.
|
Understanding t-test for linear regression
The coefficient estimates the effect of the corresponding IV on the DV; the standard error of that coefficient estimates the average error in that coefficient's estimates; the t-test tells you how man
|
9,736
|
Do we need hypothesis testing when we have all the population?
|
To illustrate my points, I will assume that everybody has been asked whether they prefer Star Trek or Doctor Who and has to choose one of them (there is no neutral option).
To keep things simple, let’s also assume that your census data is actually complete and accurate (which it rarely ever is).
There are some important caveats about your situation:
Your demographic population hardly ever is your statistical population.
In fact, I cannot think of a single example where it is reasonable to ask the kind of questions answered by statistical tests about a statistical population that is a demographic population.
For example, suppose you want to settle once and for all the question whether Star Trek or Doctor Who is better, and you define better via the preference of everybody alive at the time of the census.
You find that 1234567 people prefer Star Trek and 1234569 people prefer Doctor Who.
If you want to accept this verdict as it is, no statistical test is needed.
However, if you want to find out whether this difference reflects actual preference or can be explained by forcing undecided people to make a random choice.
For example, you can now investigate the null model that people choose between the two randomly and see how extreme a difference of 2 is for your demographic population size.
In that case, your statistical population is not your demographic population, but the aggregated outcome of an infinite amount of censuses performed on your current demographic population.
If you have data the size of the population of a reasonably sized administrative region and for the questions usually answered by it, you should focus on effect size, not on significance.
For example, there are no practical implications whether Star Trek is better than Doctor Who by a small margin, but you want to decide practical stuff like how much time to allot to the shows on national television.
If 1234567 people prefer Star Trek and 1234569 people prefer Doctor Who, you would decide to allot both an equal amount of screen time, whether that tiny difference is statistically significant or not.
On a side note, once you care about effect size, you may want to know the margin of error of this, and this can be indeed be determined by some random sampling as you are alluding to in your question, namely bootstrapping.
Using demographic populations tends to lead to pseudoreplication.
Your typical statistical test assumes uncorrelated samples.
In some cases you can avoid this requirement if you have good information on the correlation structure and build a null model based on this, but that’s rather the exception. Instead, for smaller samples, you avoid correlated samples by explicitly avoiding to sample two people from the same household or similar.
When your sample is the entire demographic population, you cannot do this and thus you inevitably have correlations.
If you treat them as independent samples nonetheless, you commit pseudoreplication.
In our example, people do not arrive at a preference of Star Trek or Doctor Who independently, but instead are influenced by their parents, friends, partners, etc. and their fates align.
If the matriarch of some popular clan prefers Doctor Who, this is going to influence many other people thus leading to pseudoreplication.
Or, if four fans are killed in a car crash on their way to a Star Trek convention, boom, pseudoreplication.
To give another perspective at this, let’s consider another example that avoids the second and third problem as much as possible and is somewhat more practical:
Suppose you are in charge of a wildlife reserve featuring the only remaining pink elephants in the world.
As pink elephants stand out (guess why they are endangered), you can easily perform a census on them.
You notice that you have 50 female and 42 male elephants and wonder if this indicates a true imbalance or can be explained by random fluctuations.
You can perform a statistical test with the null hypothesis that the sex of pink elephants is random (with equal probability) and uncorrelated (e.g., no monozygotic twins).
But here again, your statistical population is not your ecological population, but all pink elephants ever in the multiverse, i.e., it includes infinite hypothetical replications of the experiment of running your wildlife reserve for a century (details depend on the scope of your scientific question).
|
Do we need hypothesis testing when we have all the population?
|
To illustrate my points, I will assume that everybody has been asked whether they prefer Star Trek or Doctor Who and has to choose one of them (there is no neutral option).
To keep things simple, let’
|
Do we need hypothesis testing when we have all the population?
To illustrate my points, I will assume that everybody has been asked whether they prefer Star Trek or Doctor Who and has to choose one of them (there is no neutral option).
To keep things simple, let’s also assume that your census data is actually complete and accurate (which it rarely ever is).
There are some important caveats about your situation:
Your demographic population hardly ever is your statistical population.
In fact, I cannot think of a single example where it is reasonable to ask the kind of questions answered by statistical tests about a statistical population that is a demographic population.
For example, suppose you want to settle once and for all the question whether Star Trek or Doctor Who is better, and you define better via the preference of everybody alive at the time of the census.
You find that 1234567 people prefer Star Trek and 1234569 people prefer Doctor Who.
If you want to accept this verdict as it is, no statistical test is needed.
However, if you want to find out whether this difference reflects actual preference or can be explained by forcing undecided people to make a random choice.
For example, you can now investigate the null model that people choose between the two randomly and see how extreme a difference of 2 is for your demographic population size.
In that case, your statistical population is not your demographic population, but the aggregated outcome of an infinite amount of censuses performed on your current demographic population.
If you have data the size of the population of a reasonably sized administrative region and for the questions usually answered by it, you should focus on effect size, not on significance.
For example, there are no practical implications whether Star Trek is better than Doctor Who by a small margin, but you want to decide practical stuff like how much time to allot to the shows on national television.
If 1234567 people prefer Star Trek and 1234569 people prefer Doctor Who, you would decide to allot both an equal amount of screen time, whether that tiny difference is statistically significant or not.
On a side note, once you care about effect size, you may want to know the margin of error of this, and this can be indeed be determined by some random sampling as you are alluding to in your question, namely bootstrapping.
Using demographic populations tends to lead to pseudoreplication.
Your typical statistical test assumes uncorrelated samples.
In some cases you can avoid this requirement if you have good information on the correlation structure and build a null model based on this, but that’s rather the exception. Instead, for smaller samples, you avoid correlated samples by explicitly avoiding to sample two people from the same household or similar.
When your sample is the entire demographic population, you cannot do this and thus you inevitably have correlations.
If you treat them as independent samples nonetheless, you commit pseudoreplication.
In our example, people do not arrive at a preference of Star Trek or Doctor Who independently, but instead are influenced by their parents, friends, partners, etc. and their fates align.
If the matriarch of some popular clan prefers Doctor Who, this is going to influence many other people thus leading to pseudoreplication.
Or, if four fans are killed in a car crash on their way to a Star Trek convention, boom, pseudoreplication.
To give another perspective at this, let’s consider another example that avoids the second and third problem as much as possible and is somewhat more practical:
Suppose you are in charge of a wildlife reserve featuring the only remaining pink elephants in the world.
As pink elephants stand out (guess why they are endangered), you can easily perform a census on them.
You notice that you have 50 female and 42 male elephants and wonder if this indicates a true imbalance or can be explained by random fluctuations.
You can perform a statistical test with the null hypothesis that the sex of pink elephants is random (with equal probability) and uncorrelated (e.g., no monozygotic twins).
But here again, your statistical population is not your ecological population, but all pink elephants ever in the multiverse, i.e., it includes infinite hypothetical replications of the experiment of running your wildlife reserve for a century (details depend on the scope of your scientific question).
|
Do we need hypothesis testing when we have all the population?
To illustrate my points, I will assume that everybody has been asked whether they prefer Star Trek or Doctor Who and has to choose one of them (there is no neutral option).
To keep things simple, let’
|
9,737
|
Do we need hypothesis testing when we have all the population?
|
It all depends on your goal.
If you want to know how many people smoke and how many people die of lung cancer you can just count them, but if you want to know whether smoking increases the risk for lung cancer then you need statistical inference.
If you want to know high school students' educational attainments, you can just look at complete data, but if you want to know the effects of high school students' family backgrounds and mental abilities on their eventual educational attainments you need statistical inference.
If you want to know workers' earnings, you can just look at census data, but if you want to study the effects of educational attainment on earnings, you need statistical inference (you can find more examples in Morgan & Winship, Counterfactuals and Causal Inference: Methods and Principles for Social Research.)
Generally speaking, if you are only looking for summary statistics in order to communicate the largest amount of information as simply as possible, you can just count, sum, divide, plot etc.
But if you wish to predict what will happen, or to understand what causes what, then you need statistical inference: assumptions, paradigms, estimation, hypothesis testing, model validation, etc.
|
Do we need hypothesis testing when we have all the population?
|
It all depends on your goal.
If you want to know how many people smoke and how many people die of lung cancer you can just count them, but if you want to know whether smoking increases the risk for lu
|
Do we need hypothesis testing when we have all the population?
It all depends on your goal.
If you want to know how many people smoke and how many people die of lung cancer you can just count them, but if you want to know whether smoking increases the risk for lung cancer then you need statistical inference.
If you want to know high school students' educational attainments, you can just look at complete data, but if you want to know the effects of high school students' family backgrounds and mental abilities on their eventual educational attainments you need statistical inference.
If you want to know workers' earnings, you can just look at census data, but if you want to study the effects of educational attainment on earnings, you need statistical inference (you can find more examples in Morgan & Winship, Counterfactuals and Causal Inference: Methods and Principles for Social Research.)
Generally speaking, if you are only looking for summary statistics in order to communicate the largest amount of information as simply as possible, you can just count, sum, divide, plot etc.
But if you wish to predict what will happen, or to understand what causes what, then you need statistical inference: assumptions, paradigms, estimation, hypothesis testing, model validation, etc.
|
Do we need hypothesis testing when we have all the population?
It all depends on your goal.
If you want to know how many people smoke and how many people die of lung cancer you can just count them, but if you want to know whether smoking increases the risk for lu
|
9,738
|
Do we need hypothesis testing when we have all the population?
|
Funny. I spent years explaining to clients that in cases with true census information there was no variance and therefore statistical significance was meaningless.
Example: If I have data from 150 stores in a supermarket chain that says 15000 cases of Coke and 16000 cases of Pepsi were sold in a week, we can definitely say that more cases of Pepsi were sold. [There might be measurement error, but not sampling error.]
But, as @Sergio notes in his answer, you might want an inference. A simple example might be: is this difference between Pepsi and Coke larger than it typically is? For that, you'd look at the variation in the sales difference versus the sales difference in previous weeks, and you'd draw a confidence interval or do a statistical test to see if this difference was unusual.
|
Do we need hypothesis testing when we have all the population?
|
Funny. I spent years explaining to clients that in cases with true census information there was no variance and therefore statistical significance was meaningless.
Example: If I have data from 150 sto
|
Do we need hypothesis testing when we have all the population?
Funny. I spent years explaining to clients that in cases with true census information there was no variance and therefore statistical significance was meaningless.
Example: If I have data from 150 stores in a supermarket chain that says 15000 cases of Coke and 16000 cases of Pepsi were sold in a week, we can definitely say that more cases of Pepsi were sold. [There might be measurement error, but not sampling error.]
But, as @Sergio notes in his answer, you might want an inference. A simple example might be: is this difference between Pepsi and Coke larger than it typically is? For that, you'd look at the variation in the sales difference versus the sales difference in previous weeks, and you'd draw a confidence interval or do a statistical test to see if this difference was unusual.
|
Do we need hypothesis testing when we have all the population?
Funny. I spent years explaining to clients that in cases with true census information there was no variance and therefore statistical significance was meaningless.
Example: If I have data from 150 sto
|
9,739
|
Do we need hypothesis testing when we have all the population?
|
In typical applications of hypothesis testing, you do not have access to the whole population of interest, but you want to make statements about the parameters that govern the distribution of the data in the population (mean, variance, correlation,...). Then, you take a sample from the population, and assess if the sample is compatible with the hypothesis that the population parameter is some pre-specified value (hypothesis testing), or you estimate the parameter from you sample (parameter estimation).
However, when you really have the whole population, you are in the rare position that you have direct access to the true population parameters - for example, the population mean is just the mean of all the values of the population. Then you don't need to perform any further hypothesis testing or inference - the parameter is exactly what you have.
Of course, the situations where you really have data from the whole population of interest are exceptionally rare, and mostly constrained to textbook examples.
|
Do we need hypothesis testing when we have all the population?
|
In typical applications of hypothesis testing, you do not have access to the whole population of interest, but you want to make statements about the parameters that govern the distribution of the data
|
Do we need hypothesis testing when we have all the population?
In typical applications of hypothesis testing, you do not have access to the whole population of interest, but you want to make statements about the parameters that govern the distribution of the data in the population (mean, variance, correlation,...). Then, you take a sample from the population, and assess if the sample is compatible with the hypothesis that the population parameter is some pre-specified value (hypothesis testing), or you estimate the parameter from you sample (parameter estimation).
However, when you really have the whole population, you are in the rare position that you have direct access to the true population parameters - for example, the population mean is just the mean of all the values of the population. Then you don't need to perform any further hypothesis testing or inference - the parameter is exactly what you have.
Of course, the situations where you really have data from the whole population of interest are exceptionally rare, and mostly constrained to textbook examples.
|
Do we need hypothesis testing when we have all the population?
In typical applications of hypothesis testing, you do not have access to the whole population of interest, but you want to make statements about the parameters that govern the distribution of the data
|
9,740
|
Do we need hypothesis testing when we have all the population?
|
Let's say you are measuring height in the current world population and you want to caompare male and female height.
To check the hypothesis "average male height for men alive today is higher than for women alive today", you can just measure every man and woman on the planet and compare the results. If male height is on average 0.0000000000000001cm bigger even with a standard deviation trillions of times bigger, your hypothesis is proven correct.
However, such a conclusion is probably not useful in practice. Since people are constantly being born and dying, you probably don't care about the current population, but about a more abstract population of "potentially existing humans" or "all humans in history" of which you take people alive today as a sample. Here you need hypothesis testing.
|
Do we need hypothesis testing when we have all the population?
|
Let's say you are measuring height in the current world population and you want to caompare male and female height.
To check the hypothesis "average male height for men alive today is higher than for
|
Do we need hypothesis testing when we have all the population?
Let's say you are measuring height in the current world population and you want to caompare male and female height.
To check the hypothesis "average male height for men alive today is higher than for women alive today", you can just measure every man and woman on the planet and compare the results. If male height is on average 0.0000000000000001cm bigger even with a standard deviation trillions of times bigger, your hypothesis is proven correct.
However, such a conclusion is probably not useful in practice. Since people are constantly being born and dying, you probably don't care about the current population, but about a more abstract population of "potentially existing humans" or "all humans in history" of which you take people alive today as a sample. Here you need hypothesis testing.
|
Do we need hypothesis testing when we have all the population?
Let's say you are measuring height in the current world population and you want to caompare male and female height.
To check the hypothesis "average male height for men alive today is higher than for
|
9,741
|
Do we need hypothesis testing when we have all the population?
|
I would be very wary about anyone claiming to have knowledge about the complete population. There is a lot of confusion about what this term means in a statistical context, leading to people claiming they have the complete population, when they actually don't. And where the complete population is known, the scientific value is not clear.
Assume you want to figure out if higher education leads to higher income in the US. So you get the level of education and the annual income of every person in the US in 2015. That's your demographic population.
But it isn't. The data is from 2015 but the question was about the relation in general. The actual population would be the data from every person in the US in every year in the past and yet to come. There is no way to ever get data for this statistical population.
Also, if you look at the definition of a theory given e.g. by Popper, then a theory is about predicting something unknown. That is, you need to generalize. If you have a complete population, you are merely describing that population. That may be relevant in some fields but in theory driven fields, it doesn't have much value.
In psychology there have been some researchers that abused this misunderstanding between population and sample. There have been cases where researchers claimed that their sample is the actual population, i.e. the results only apply to those people that have been sampled, and therefore a failure to replicate the results is just due to the use of a different population. Nice way out, but I really don't know why I should read a paper that only makes a theory about a small number of annonymous people that I will probably never ever encounter and that may not be applicable to anyone else.
|
Do we need hypothesis testing when we have all the population?
|
I would be very wary about anyone claiming to have knowledge about the complete population. There is a lot of confusion about what this term means in a statistical context, leading to people claiming
|
Do we need hypothesis testing when we have all the population?
I would be very wary about anyone claiming to have knowledge about the complete population. There is a lot of confusion about what this term means in a statistical context, leading to people claiming they have the complete population, when they actually don't. And where the complete population is known, the scientific value is not clear.
Assume you want to figure out if higher education leads to higher income in the US. So you get the level of education and the annual income of every person in the US in 2015. That's your demographic population.
But it isn't. The data is from 2015 but the question was about the relation in general. The actual population would be the data from every person in the US in every year in the past and yet to come. There is no way to ever get data for this statistical population.
Also, if you look at the definition of a theory given e.g. by Popper, then a theory is about predicting something unknown. That is, you need to generalize. If you have a complete population, you are merely describing that population. That may be relevant in some fields but in theory driven fields, it doesn't have much value.
In psychology there have been some researchers that abused this misunderstanding between population and sample. There have been cases where researchers claimed that their sample is the actual population, i.e. the results only apply to those people that have been sampled, and therefore a failure to replicate the results is just due to the use of a different population. Nice way out, but I really don't know why I should read a paper that only makes a theory about a small number of annonymous people that I will probably never ever encounter and that may not be applicable to anyone else.
|
Do we need hypothesis testing when we have all the population?
I would be very wary about anyone claiming to have knowledge about the complete population. There is a lot of confusion about what this term means in a statistical context, leading to people claiming
|
9,742
|
Do we need hypothesis testing when we have all the population?
|
Let me add something at the good answers above. Some of them address mainly the problem of reliability of the condition “have all the population”, as the accepted one, and related practical points.
I propose a more theoretical perspective, related to the Sergio’s answer but not equal.
If you say you “have all the population”, I focus on the case where the population is finite. I also consider the case of infinite data in the following. Another aspect seems me relevant also. The data are about one variable only (case 1) or several variables are collected (case 2):
If the data is about one variable, you can perfectly compute all the moments and all indicators you want. Moreover you know/see, by plotting, the exact distribution. Note that, if the variable is continuous, finite data hardly fits perfectly any parametric distribution. Ideally, if the data is infinite, all incorrect distributions are definitely rejectable by some test and only the correct one is not rejected (the test can remain useful only because it possible to lose something by plotting). In this case, parameters also an be perfectly computed. Hypothesis testing about reliability of some statistical quantity (its proper meaning) becomes senseless.
If several variables are collected, the above considerations above hold, but another must be added. In a purely descriptive situation, like case 1, it is relevant to note that multivariate concepts like correlations and any other dependencies metrics become perfectly known.
However I don’t love description in the multivariate case because in my experience any multivariate measure, above all the regression, leads to think about some kind of effect that has more to do with causation and/or prediction than description (see: Regression: Causation vs Prediction vs Description).
If you want to use the data to answer causal questions, the fact that you know the entire population (exact joint distribution) does not warrant anything. Causal effects that you can try to measure with your data by regression or other metrics, can be completely wrong. The standard deviation of these effects is $0$, but a bias can remain.
If your goal is prediction, the question gets a bit more complicated. If the population is finite, nothing remains to predict. If the data is infinite, you cannot have all of it. In the purely theoretical point of view, let me remain in regression case, you can have an infinite amount of data that permit you compute (more than estimate) the parameters. So you can predict some new data. However, what data you have matters yet. It is possible to show that, if we have an infinite amount of data, the best prediction model coincides with the true model (data-generating process) like in the causal question (see the reference in the previous link). Then your prediction model can be far from the best one. Like before, the standard deviation is $0$, but a bias can remain.
|
Do we need hypothesis testing when we have all the population?
|
Let me add something at the good answers above. Some of them address mainly the problem of reliability of the condition “have all the population”, as the accepted one, and related practical points.
I
|
Do we need hypothesis testing when we have all the population?
Let me add something at the good answers above. Some of them address mainly the problem of reliability of the condition “have all the population”, as the accepted one, and related practical points.
I propose a more theoretical perspective, related to the Sergio’s answer but not equal.
If you say you “have all the population”, I focus on the case where the population is finite. I also consider the case of infinite data in the following. Another aspect seems me relevant also. The data are about one variable only (case 1) or several variables are collected (case 2):
If the data is about one variable, you can perfectly compute all the moments and all indicators you want. Moreover you know/see, by plotting, the exact distribution. Note that, if the variable is continuous, finite data hardly fits perfectly any parametric distribution. Ideally, if the data is infinite, all incorrect distributions are definitely rejectable by some test and only the correct one is not rejected (the test can remain useful only because it possible to lose something by plotting). In this case, parameters also an be perfectly computed. Hypothesis testing about reliability of some statistical quantity (its proper meaning) becomes senseless.
If several variables are collected, the above considerations above hold, but another must be added. In a purely descriptive situation, like case 1, it is relevant to note that multivariate concepts like correlations and any other dependencies metrics become perfectly known.
However I don’t love description in the multivariate case because in my experience any multivariate measure, above all the regression, leads to think about some kind of effect that has more to do with causation and/or prediction than description (see: Regression: Causation vs Prediction vs Description).
If you want to use the data to answer causal questions, the fact that you know the entire population (exact joint distribution) does not warrant anything. Causal effects that you can try to measure with your data by regression or other metrics, can be completely wrong. The standard deviation of these effects is $0$, but a bias can remain.
If your goal is prediction, the question gets a bit more complicated. If the population is finite, nothing remains to predict. If the data is infinite, you cannot have all of it. In the purely theoretical point of view, let me remain in regression case, you can have an infinite amount of data that permit you compute (more than estimate) the parameters. So you can predict some new data. However, what data you have matters yet. It is possible to show that, if we have an infinite amount of data, the best prediction model coincides with the true model (data-generating process) like in the causal question (see the reference in the previous link). Then your prediction model can be far from the best one. Like before, the standard deviation is $0$, but a bias can remain.
|
Do we need hypothesis testing when we have all the population?
Let me add something at the good answers above. Some of them address mainly the problem of reliability of the condition “have all the population”, as the accepted one, and related practical points.
I
|
9,743
|
Real life examples of distributions with negative skewness
|
In the UK, price of a book. There is a "Recommended retail price" which will generally be the modal price, and virtually nowhere would you have to pay more. But some shops will discount, and a few will discount heavily.
Also, age at retirement. Most people retire at 65-68 which is when the state pension kicks in, very few people work longer, but some people retire in their 50s and quite a lot in their early 60s.
Then too, the number of GCSEs people get. Most kids are entered for 8-10 and so get 8-10. A small number do more. Some of the kids don't pass all their exams though, so there is a steady increase from 0 to 7.
|
Real life examples of distributions with negative skewness
|
In the UK, price of a book. There is a "Recommended retail price" which will generally be the modal price, and virtually nowhere would you have to pay more. But some shops will discount, and a few wil
|
Real life examples of distributions with negative skewness
In the UK, price of a book. There is a "Recommended retail price" which will generally be the modal price, and virtually nowhere would you have to pay more. But some shops will discount, and a few will discount heavily.
Also, age at retirement. Most people retire at 65-68 which is when the state pension kicks in, very few people work longer, but some people retire in their 50s and quite a lot in their early 60s.
Then too, the number of GCSEs people get. Most kids are entered for 8-10 and so get 8-10. A small number do more. Some of the kids don't pass all their exams though, so there is a steady increase from 0 to 7.
|
Real life examples of distributions with negative skewness
In the UK, price of a book. There is a "Recommended retail price" which will generally be the modal price, and virtually nowhere would you have to pay more. But some shops will discount, and a few wil
|
9,744
|
Real life examples of distributions with negative skewness
|
Nick Cox accurately commented that "age at death is negatively skewed in developed countries" which I thought was a great example.
I found the most convenient figures I could lay my hands on came from the Australian Bureau of Statistics (in particular, I used this Excel sheet), since their age bins went up to 100 year olds and the oldest Australian male was 111 , so I felt comfortable cutting off the final bin at 110 years. Other national statistical agencies often seemed to stop at 95 which made the final bin uncomfortably wide. The resulting histogram shows a very clear negative skew, as well as some other interesting features such as a small peak in death rate among young children, which would be well suited to class discussion and interpretation.
R code with raw data follows, the HistogramTools package proved very useful for plotting based on aggregated data! Thanks to this StackOverflow question for flagging it up.
library(HistogramTools)
deathCounts <- c(565, 116, 69, 78, 319, 501, 633, 655, 848, 1226, 1633, 2459, 3375, 4669, 6152, 7436, 9526, 12619, 12455, 7113, 2104, 241)
ageBreaks <- c(0, 1, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100, 110)
myhist <- PreBinnedHistogram(
breaks = ageBreaks,
counts = deathCounts,
xname = "Age at Death of Australian Males, 2012")
plot(myhist)
|
Real life examples of distributions with negative skewness
|
Nick Cox accurately commented that "age at death is negatively skewed in developed countries" which I thought was a great example.
I found the most convenient figures I could lay my hands on came from
|
Real life examples of distributions with negative skewness
Nick Cox accurately commented that "age at death is negatively skewed in developed countries" which I thought was a great example.
I found the most convenient figures I could lay my hands on came from the Australian Bureau of Statistics (in particular, I used this Excel sheet), since their age bins went up to 100 year olds and the oldest Australian male was 111 , so I felt comfortable cutting off the final bin at 110 years. Other national statistical agencies often seemed to stop at 95 which made the final bin uncomfortably wide. The resulting histogram shows a very clear negative skew, as well as some other interesting features such as a small peak in death rate among young children, which would be well suited to class discussion and interpretation.
R code with raw data follows, the HistogramTools package proved very useful for plotting based on aggregated data! Thanks to this StackOverflow question for flagging it up.
library(HistogramTools)
deathCounts <- c(565, 116, 69, 78, 319, 501, 633, 655, 848, 1226, 1633, 2459, 3375, 4669, 6152, 7436, 9526, 12619, 12455, 7113, 2104, 241)
ageBreaks <- c(0, 1, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100, 110)
myhist <- PreBinnedHistogram(
breaks = ageBreaks,
counts = deathCounts,
xname = "Age at Death of Australian Males, 2012")
plot(myhist)
|
Real life examples of distributions with negative skewness
Nick Cox accurately commented that "age at death is negatively skewed in developed countries" which I thought was a great example.
I found the most convenient figures I could lay my hands on came from
|
9,745
|
Real life examples of distributions with negative skewness
|
Here are the results for the forty athletes who successfully completed a legal jump in the qualifying round of the 2012 Olympic men's long jump, presented in a kernel density plot with rug plot underneath.
It seems to be much easier to be a metre behind the main group of competitors than to be a metre ahead, which would explain the negative skewness.
I suspect some of the bunching at the top end is due to the athletes targeting qualification (which required a top twelve finish or a result of 8.10 metres or above) rather than achieving the longest possible distance. The fact that the top two results were 8.11 metres, just above the automatic qualifying mark, is strongly suggestive, as is the way the medal-winning jumps in the Final were both longer and more spread out at 8.31, 8.16 and 8.12 metres. Results in the Final had a slight, non-significant, negative skew.
For comparison, results for the Olympic Heptathlon at Seoul 1988 are available in the heptathlon data set in the R package HSAUR. In that competition there was no qualifying round but each event contributed points towards the final classification; the female competitors showed pronounced negative skewness in the high jump results and somewhat negative skew in the long jump. Interestingly this was not replicated in the throwing events (shot and javelin) even though they are also events in which a higher number corresponds to a better result. The final points scores were also somewhat negatively skewed.
Data and code
require(moments)
require(ggplot2)
sourceAddress <- "http://www.olympic.org/olympic-results/london-2012/athletics/long-jump-m"
longjump.df <- read.csv(header=TRUE, sep=",", text="
rank,name,country,distance
1,Mauro Vinicius DA SILVA,BRA,8.11
2,Marquise GOODWIN,USA,8.11
3,Aleksandr MENKOV,RUS,8.09
4,Greg RUTHERFORD,GBR,8.08
5,Christopher TOMLINSON,GBR,8.06
6,Michel TORNEUS,SWE,8.03
7,Godfrey Khotso MOKOENA,RSA,8.02
8,Will CLAYE,USA,7.99
9,Mitchell WATT,AUS,7.99,
10,Tyrone SMITH,BER,7.97,
11,Henry FRAYNE,AUS,7.95,
12,Sebastian BAYER,GER,7.92,
13,Christian REIF,GER,7.92,
14,Eusebio CACERES,ESP,7.92,
15,Aleksandr PETROV,RUS,7.89,
16,Sergey MORGUNOV,RUS,7.87,
17,Mohammad ARZANDEH,IRI,7.84,
18,Ignisious GAISAH,GHA,7.79,
19,Damar FORBES,JAM,7.79,
20,Jinzhe LI,CHN,7.77,
21,Raymond HIGGS,BAH,7.76,
22,Alyn CAMARA,GER,7.72,
23,Salim SDIRI,FRA,7.71,
24,Ndiss Kaba BADJI,SEN,7.66,
25,Arsen SARGSYAN,ARM,7.62,
26,Povilas MYKOLAITIS,LTU,7.61,
27,Stanley GBAGBEKE,NGR,7.59,
28,Marcos CHUVA,POR,7.55,
29,Louis TSATOUMAS,GRE,7.53,
30,Stepan WAGNER,CZE,7.50,
31,Viktor KUZNYETSOV,UKR,7.50,
32,Luis RIVERA,MEX,7.42,
33,Ching-Hsuan LIN,TPE,7.38,
33,Supanara SUKHASVASTI N A,THA,7.38,
35,Boleslav SKHIRTLADZE,GEO,7.26,
36,Xiaoyi ZHANG,CHN,7.25,
37,Mohamed Fathalla DIFALLAH,EGY,7.08,
38,Roman NOVOTNY,CZE,6.96,
39,George KITCHENS,USA,6.84,
40,Vardan PAHLEVANYAN,ARM,6.55,
NA,Luis MELIZ,ESP,NA,
NA,Irving SALADINO,PAN,NA")
roundedSkew <- signif(skewness(longjump.df$distance, na.rm=TRUE), 3)
ggplot(longjump.df, aes(x=distance)) +
xlab("Distance in metres") +
ggtitle("London 2012 Men's Long Jump qualifying round results") +
geom_rug(size=0.8) +
geom_density(fill="steelblue") +
annotate("text", x=7.375, y=0.0625, colour="white", label=paste("Source:", sourceAddress), size=3) +
annotate("rect", xmin = 6.25, xmax = 7.25, ymin = 0.5, ymax = 1.125, fill="white") +
annotate("text", x=6.75, y=1, colour="black", label="Best jump in up to 3 attempts") +
annotate("text", x=6.75, y=.875, colour="black", label="42 athletes competed") +
annotate("text", x=6.75, y=.75, colour="black", label="2 athletes had no legal jump") +
annotate("text", x=6.75, y=.625, colour="black", label=paste("Skewness = ", roundedSkew))
# Results of the top twelve who qualified for the Final were closer to symmetric
skewness(longjump.df$distance[1:12])
# -0.1248782
# Results in the Final (some had 3 jumps, others 6) were only slightly negatively skewed
skewness(c(8.31, 8.16, 8.12, 8.11, 8.10, 8.07, 8.01, 7.93, 7.85, 7.80, 7.78, 7.70))
# -0.08578357
# Compare to Seoul 1988 Heptathlon
require(HSAUR)
skewness(heptathlon)
|
Real life examples of distributions with negative skewness
|
Here are the results for the forty athletes who successfully completed a legal jump in the qualifying round of the 2012 Olympic men's long jump, presented in a kernel density plot with rug plot undern
|
Real life examples of distributions with negative skewness
Here are the results for the forty athletes who successfully completed a legal jump in the qualifying round of the 2012 Olympic men's long jump, presented in a kernel density plot with rug plot underneath.
It seems to be much easier to be a metre behind the main group of competitors than to be a metre ahead, which would explain the negative skewness.
I suspect some of the bunching at the top end is due to the athletes targeting qualification (which required a top twelve finish or a result of 8.10 metres or above) rather than achieving the longest possible distance. The fact that the top two results were 8.11 metres, just above the automatic qualifying mark, is strongly suggestive, as is the way the medal-winning jumps in the Final were both longer and more spread out at 8.31, 8.16 and 8.12 metres. Results in the Final had a slight, non-significant, negative skew.
For comparison, results for the Olympic Heptathlon at Seoul 1988 are available in the heptathlon data set in the R package HSAUR. In that competition there was no qualifying round but each event contributed points towards the final classification; the female competitors showed pronounced negative skewness in the high jump results and somewhat negative skew in the long jump. Interestingly this was not replicated in the throwing events (shot and javelin) even though they are also events in which a higher number corresponds to a better result. The final points scores were also somewhat negatively skewed.
Data and code
require(moments)
require(ggplot2)
sourceAddress <- "http://www.olympic.org/olympic-results/london-2012/athletics/long-jump-m"
longjump.df <- read.csv(header=TRUE, sep=",", text="
rank,name,country,distance
1,Mauro Vinicius DA SILVA,BRA,8.11
2,Marquise GOODWIN,USA,8.11
3,Aleksandr MENKOV,RUS,8.09
4,Greg RUTHERFORD,GBR,8.08
5,Christopher TOMLINSON,GBR,8.06
6,Michel TORNEUS,SWE,8.03
7,Godfrey Khotso MOKOENA,RSA,8.02
8,Will CLAYE,USA,7.99
9,Mitchell WATT,AUS,7.99,
10,Tyrone SMITH,BER,7.97,
11,Henry FRAYNE,AUS,7.95,
12,Sebastian BAYER,GER,7.92,
13,Christian REIF,GER,7.92,
14,Eusebio CACERES,ESP,7.92,
15,Aleksandr PETROV,RUS,7.89,
16,Sergey MORGUNOV,RUS,7.87,
17,Mohammad ARZANDEH,IRI,7.84,
18,Ignisious GAISAH,GHA,7.79,
19,Damar FORBES,JAM,7.79,
20,Jinzhe LI,CHN,7.77,
21,Raymond HIGGS,BAH,7.76,
22,Alyn CAMARA,GER,7.72,
23,Salim SDIRI,FRA,7.71,
24,Ndiss Kaba BADJI,SEN,7.66,
25,Arsen SARGSYAN,ARM,7.62,
26,Povilas MYKOLAITIS,LTU,7.61,
27,Stanley GBAGBEKE,NGR,7.59,
28,Marcos CHUVA,POR,7.55,
29,Louis TSATOUMAS,GRE,7.53,
30,Stepan WAGNER,CZE,7.50,
31,Viktor KUZNYETSOV,UKR,7.50,
32,Luis RIVERA,MEX,7.42,
33,Ching-Hsuan LIN,TPE,7.38,
33,Supanara SUKHASVASTI N A,THA,7.38,
35,Boleslav SKHIRTLADZE,GEO,7.26,
36,Xiaoyi ZHANG,CHN,7.25,
37,Mohamed Fathalla DIFALLAH,EGY,7.08,
38,Roman NOVOTNY,CZE,6.96,
39,George KITCHENS,USA,6.84,
40,Vardan PAHLEVANYAN,ARM,6.55,
NA,Luis MELIZ,ESP,NA,
NA,Irving SALADINO,PAN,NA")
roundedSkew <- signif(skewness(longjump.df$distance, na.rm=TRUE), 3)
ggplot(longjump.df, aes(x=distance)) +
xlab("Distance in metres") +
ggtitle("London 2012 Men's Long Jump qualifying round results") +
geom_rug(size=0.8) +
geom_density(fill="steelblue") +
annotate("text", x=7.375, y=0.0625, colour="white", label=paste("Source:", sourceAddress), size=3) +
annotate("rect", xmin = 6.25, xmax = 7.25, ymin = 0.5, ymax = 1.125, fill="white") +
annotate("text", x=6.75, y=1, colour="black", label="Best jump in up to 3 attempts") +
annotate("text", x=6.75, y=.875, colour="black", label="42 athletes competed") +
annotate("text", x=6.75, y=.75, colour="black", label="2 athletes had no legal jump") +
annotate("text", x=6.75, y=.625, colour="black", label=paste("Skewness = ", roundedSkew))
# Results of the top twelve who qualified for the Final were closer to symmetric
skewness(longjump.df$distance[1:12])
# -0.1248782
# Results in the Final (some had 3 jumps, others 6) were only slightly negatively skewed
skewness(c(8.31, 8.16, 8.12, 8.11, 8.10, 8.07, 8.01, 7.93, 7.85, 7.80, 7.78, 7.70))
# -0.08578357
# Compare to Seoul 1988 Heptathlon
require(HSAUR)
skewness(heptathlon)
|
Real life examples of distributions with negative skewness
Here are the results for the forty athletes who successfully completed a legal jump in the qualifying round of the 2012 Olympic men's long jump, presented in a kernel density plot with rug plot undern
|
9,746
|
Real life examples of distributions with negative skewness
|
Scores on easy tests, or alternatively, scores on tests for which students are especially motivated, tend to be left skew.
As a result, the SAT/ACT scores of students entering sought after colleges (and even more so, their GPAs) tend to be left skew. There's plenty of examples at collegeapps.about.com e.g. a plot of University of Chicago SAT/ACT and GPA is here.
Similarly GPAs of graduates are often left-skew, e.g. the histograms below of GPAs of white and black graduates at a for-profit university taken from Fig 5 of Gramling, Tim. "How five student characteristics accurately predict for-profit university graduation odds." SAGE Open 3.3 (2013): 2158244013497026.
(It's not hard to find other, similar examples.)
|
Real life examples of distributions with negative skewness
|
Scores on easy tests, or alternatively, scores on tests for which students are especially motivated, tend to be left skew.
As a result, the SAT/ACT scores of students entering sought after colleges (a
|
Real life examples of distributions with negative skewness
Scores on easy tests, or alternatively, scores on tests for which students are especially motivated, tend to be left skew.
As a result, the SAT/ACT scores of students entering sought after colleges (and even more so, their GPAs) tend to be left skew. There's plenty of examples at collegeapps.about.com e.g. a plot of University of Chicago SAT/ACT and GPA is here.
Similarly GPAs of graduates are often left-skew, e.g. the histograms below of GPAs of white and black graduates at a for-profit university taken from Fig 5 of Gramling, Tim. "How five student characteristics accurately predict for-profit university graduation odds." SAGE Open 3.3 (2013): 2158244013497026.
(It's not hard to find other, similar examples.)
|
Real life examples of distributions with negative skewness
Scores on easy tests, or alternatively, scores on tests for which students are especially motivated, tend to be left skew.
As a result, the SAT/ACT scores of students entering sought after colleges (a
|
9,747
|
Real life examples of distributions with negative skewness
|
In Stochastic Frontier Analysis, and specifically in its historically initial focus, production, the production function of a firm/production unit in general, is specified stochastically as
$$q = f(\mathbf x) + u-w$$
where $q$ is the actual output produced by the firm, and $f(\mathbf x)$ is its production function (which is understood more as an input-output relation rather than a mathematical expression reflecting "engineering" relations) with $\mathbf x$ being a vector of production inputs (capital, labor, energy, materials, etc). The production function in Economic Theory represents maximum output, given technology and inputs, i.e. it embodies full efficiency. Then $u$ is a zero-mean normal disturbance on the production process, and $w$ is a non-negative random variable representing deviation from full efficiency due to reasons that the econometrician may not know, but he can measure through this set up. This random variable is usually assume to follow a half-normal or exponential distribution. Assuming the half normal (for a reason), we have
$$u \sim N(0, \sigma_u^2),\;\; w\sim HN\left(\sqrt {\frac 2{\pi}}\sigma_2, \left(1- \frac 2{\pi}\right)\sigma_2^2\right)$$
where $\sigma_2$ is the standard deviation of the "underlying" normal random variable whose absolute value is the Half-normal.
The composite error-term $\varepsilon = u-w$ is characterized by the following density
$$f_{\varepsilon}(\varepsilon) = \frac 2{s_2}\phi\left(\varepsilon/s_2\right)\Phi\left((-\frac {\sigma_2}{\sigma_u})\cdot(\varepsilon/s_2)\right),\;\; s_2^2 = \sigma^2_u + \sigma^2_2$$
This is a skew-normal density, with location parameter $0$, scale parameter $s_2$ and skew parameter $(-\frac {\sigma_2}{\sigma_u})$, where $\phi$ and $\Phi$ are the standard normal pdf and cdf respectively. For $\sigma_u =1, \;\; \sigma_2 = 3$, the density looks like this:
So negative skewness is, I'd say,the most natural modelling of the efforts of human race itself: always deviating from its imagined ideal -in most cases lagging behind it (the negative part of the density), while in relatively fewer cases, transcending its perceived limits (the positive part of the density) . Students themselves can be modeled as such a production function. It is straightforward to map the symmetric disturbance and the one-sided error to aspects of real life. I cannot imagine how more intuitive can one get about it.
|
Real life examples of distributions with negative skewness
|
In Stochastic Frontier Analysis, and specifically in its historically initial focus, production, the production function of a firm/production unit in general, is specified stochastically as
$$q = f(\m
|
Real life examples of distributions with negative skewness
In Stochastic Frontier Analysis, and specifically in its historically initial focus, production, the production function of a firm/production unit in general, is specified stochastically as
$$q = f(\mathbf x) + u-w$$
where $q$ is the actual output produced by the firm, and $f(\mathbf x)$ is its production function (which is understood more as an input-output relation rather than a mathematical expression reflecting "engineering" relations) with $\mathbf x$ being a vector of production inputs (capital, labor, energy, materials, etc). The production function in Economic Theory represents maximum output, given technology and inputs, i.e. it embodies full efficiency. Then $u$ is a zero-mean normal disturbance on the production process, and $w$ is a non-negative random variable representing deviation from full efficiency due to reasons that the econometrician may not know, but he can measure through this set up. This random variable is usually assume to follow a half-normal or exponential distribution. Assuming the half normal (for a reason), we have
$$u \sim N(0, \sigma_u^2),\;\; w\sim HN\left(\sqrt {\frac 2{\pi}}\sigma_2, \left(1- \frac 2{\pi}\right)\sigma_2^2\right)$$
where $\sigma_2$ is the standard deviation of the "underlying" normal random variable whose absolute value is the Half-normal.
The composite error-term $\varepsilon = u-w$ is characterized by the following density
$$f_{\varepsilon}(\varepsilon) = \frac 2{s_2}\phi\left(\varepsilon/s_2\right)\Phi\left((-\frac {\sigma_2}{\sigma_u})\cdot(\varepsilon/s_2)\right),\;\; s_2^2 = \sigma^2_u + \sigma^2_2$$
This is a skew-normal density, with location parameter $0$, scale parameter $s_2$ and skew parameter $(-\frac {\sigma_2}{\sigma_u})$, where $\phi$ and $\Phi$ are the standard normal pdf and cdf respectively. For $\sigma_u =1, \;\; \sigma_2 = 3$, the density looks like this:
So negative skewness is, I'd say,the most natural modelling of the efforts of human race itself: always deviating from its imagined ideal -in most cases lagging behind it (the negative part of the density), while in relatively fewer cases, transcending its perceived limits (the positive part of the density) . Students themselves can be modeled as such a production function. It is straightforward to map the symmetric disturbance and the one-sided error to aspects of real life. I cannot imagine how more intuitive can one get about it.
|
Real life examples of distributions with negative skewness
In Stochastic Frontier Analysis, and specifically in its historically initial focus, production, the production function of a firm/production unit in general, is specified stochastically as
$$q = f(\m
|
9,748
|
Real life examples of distributions with negative skewness
|
Asset price changes (returns) typically have negative skew - many small price increases with a few large price drops. The skew seems to hold for almost all types of assets: stocks prices, commodity prices, etc. The negative skew can be observed in monthly price changes but is much more evident when you start looking at daily or hourly price changes. I think this would be a good example because you can show the effects of frequency on skew.
More details: http://www.fusioninvesting.com/2010/09/what-is-skew-and-why-is-it-important/
|
Real life examples of distributions with negative skewness
|
Asset price changes (returns) typically have negative skew - many small price increases with a few large price drops. The skew seems to hold for almost all types of assets: stocks prices, commodity pr
|
Real life examples of distributions with negative skewness
Asset price changes (returns) typically have negative skew - many small price increases with a few large price drops. The skew seems to hold for almost all types of assets: stocks prices, commodity prices, etc. The negative skew can be observed in monthly price changes but is much more evident when you start looking at daily or hourly price changes. I think this would be a good example because you can show the effects of frequency on skew.
More details: http://www.fusioninvesting.com/2010/09/what-is-skew-and-why-is-it-important/
|
Real life examples of distributions with negative skewness
Asset price changes (returns) typically have negative skew - many small price increases with a few large price drops. The skew seems to hold for almost all types of assets: stocks prices, commodity pr
|
9,749
|
Real life examples of distributions with negative skewness
|
Negative skewness is common in flood hydrology. Below is an example of a flood frequency curve (South Creek at Mulgoa Rd, lat -33.8783, lon 150.7683) which I've taken from 'Australian Rainfall and Runoff' (ARR) the guide to flood estimation developed by Engineers, Australia.
There is a comment in ARR:
With negative skew, which is common with logarithmic values of floods
in Australia, the log Pearson III distribution has an upper bound.
This gives an upper limit to floods that can be drawn from the
distribution. In some cases this can cause problems in estimating
floods of low AEP, but often causes no problems in practice.
[Extracted from Australian Rainfall and Runoff - Volume 1, Book IV
Section 2.]
Often floods, at a particular location, are considered to have an upper bound called the 'Probable Maximum Flood' (PMF). There are standard ways of calculating a PMF.
|
Real life examples of distributions with negative skewness
|
Negative skewness is common in flood hydrology. Below is an example of a flood frequency curve (South Creek at Mulgoa Rd, lat -33.8783, lon 150.7683) which I've taken from 'Australian Rainfall and Ru
|
Real life examples of distributions with negative skewness
Negative skewness is common in flood hydrology. Below is an example of a flood frequency curve (South Creek at Mulgoa Rd, lat -33.8783, lon 150.7683) which I've taken from 'Australian Rainfall and Runoff' (ARR) the guide to flood estimation developed by Engineers, Australia.
There is a comment in ARR:
With negative skew, which is common with logarithmic values of floods
in Australia, the log Pearson III distribution has an upper bound.
This gives an upper limit to floods that can be drawn from the
distribution. In some cases this can cause problems in estimating
floods of low AEP, but often causes no problems in practice.
[Extracted from Australian Rainfall and Runoff - Volume 1, Book IV
Section 2.]
Often floods, at a particular location, are considered to have an upper bound called the 'Probable Maximum Flood' (PMF). There are standard ways of calculating a PMF.
|
Real life examples of distributions with negative skewness
Negative skewness is common in flood hydrology. Below is an example of a flood frequency curve (South Creek at Mulgoa Rd, lat -33.8783, lon 150.7683) which I've taken from 'Australian Rainfall and Ru
|
9,750
|
Real life examples of distributions with negative skewness
|
Gestational age at delivery (especially for live births) is left skewed. Infants can be born alive very early (although chances of continued survival are small when too early), peak between 36-41 weeks, and drop fast. It is typical for women in the US to be induced if 41/42 weeks, so we don't usually see many deliveries after that point.
|
Real life examples of distributions with negative skewness
|
Gestational age at delivery (especially for live births) is left skewed. Infants can be born alive very early (although chances of continued survival are small when too early), peak between 36-41 week
|
Real life examples of distributions with negative skewness
Gestational age at delivery (especially for live births) is left skewed. Infants can be born alive very early (although chances of continued survival are small when too early), peak between 36-41 weeks, and drop fast. It is typical for women in the US to be induced if 41/42 weeks, so we don't usually see many deliveries after that point.
|
Real life examples of distributions with negative skewness
Gestational age at delivery (especially for live births) is left skewed. Infants can be born alive very early (although chances of continued survival are small when too early), peak between 36-41 week
|
9,751
|
Real life examples of distributions with negative skewness
|
In fisheries there are often examples of negative skew because of regulatory requirements. For instance the length distribution of fish released in recreational fishery; because there is sometimes a minimum length that a fish must be in order for it to be retained all fish under the limit are discarded. But because people fish where there tends to be legal length fish there tends to be negative skew and mode towards the upper legal limit. The legal length does not represent a hard cut off though. Because of bag limits (or limits on the number of fish that can be brought back to the dock), people will still discard legal size fish when they have caught larger ones.
e.g., Sauls, B. 2012. A Summary of Data on the Size Distribution and Release Condition of Red Snapper Discards from Recreational Fishery Surveys in the Gulf of Mexico. SEDAR31-DW11. SEDAR, North Charleston, SC. 29 pp.
|
Real life examples of distributions with negative skewness
|
In fisheries there are often examples of negative skew because of regulatory requirements. For instance the length distribution of fish released in recreational fishery; because there is sometimes a m
|
Real life examples of distributions with negative skewness
In fisheries there are often examples of negative skew because of regulatory requirements. For instance the length distribution of fish released in recreational fishery; because there is sometimes a minimum length that a fish must be in order for it to be retained all fish under the limit are discarded. But because people fish where there tends to be legal length fish there tends to be negative skew and mode towards the upper legal limit. The legal length does not represent a hard cut off though. Because of bag limits (or limits on the number of fish that can be brought back to the dock), people will still discard legal size fish when they have caught larger ones.
e.g., Sauls, B. 2012. A Summary of Data on the Size Distribution and Release Condition of Red Snapper Discards from Recreational Fishery Surveys in the Gulf of Mexico. SEDAR31-DW11. SEDAR, North Charleston, SC. 29 pp.
|
Real life examples of distributions with negative skewness
In fisheries there are often examples of negative skew because of regulatory requirements. For instance the length distribution of fish released in recreational fishery; because there is sometimes a m
|
9,752
|
Real life examples of distributions with negative skewness
|
Some great suggestions have been made on this thread. On the theme of age-related mortality, machine failure rates are frequently a function of machine age and would fall into this class of distributions. In addition to the financial factors already noted, financial loss functions and distributions typically resemble these shapes, particularly in the case of extreme-valued losses, e.g., as found in BIS III (Bank of International Settlement) estimates of expected shortfall (ES), or in BIS II the value at risk (VAR) as inputs to regulatory requirements for capital reserve allocations.
|
Real life examples of distributions with negative skewness
|
Some great suggestions have been made on this thread. On the theme of age-related mortality, machine failure rates are frequently a function of machine age and would fall into this class of distributi
|
Real life examples of distributions with negative skewness
Some great suggestions have been made on this thread. On the theme of age-related mortality, machine failure rates are frequently a function of machine age and would fall into this class of distributions. In addition to the financial factors already noted, financial loss functions and distributions typically resemble these shapes, particularly in the case of extreme-valued losses, e.g., as found in BIS III (Bank of International Settlement) estimates of expected shortfall (ES), or in BIS II the value at risk (VAR) as inputs to regulatory requirements for capital reserve allocations.
|
Real life examples of distributions with negative skewness
Some great suggestions have been made on this thread. On the theme of age-related mortality, machine failure rates are frequently a function of machine age and would fall into this class of distributi
|
9,753
|
Real life examples of distributions with negative skewness
|
Want to improve this post? Provide detailed answers to this question, including citations and an explanation of why your answer is correct. Answers without enough detail may be edited or deleted.
Age of retirement in the U.S. is negatively skewed. The majority of retirees are older with a few retiring relatively young.
|
Real life examples of distributions with negative skewness
|
Want to improve this post? Provide detailed answers to this question, including citations and an explanation of why your answer is correct. Answers without enough detail may be edited or deleted.
|
Real life examples of distributions with negative skewness
Want to improve this post? Provide detailed answers to this question, including citations and an explanation of why your answer is correct. Answers without enough detail may be edited or deleted.
Age of retirement in the U.S. is negatively skewed. The majority of retirees are older with a few retiring relatively young.
|
Real life examples of distributions with negative skewness
Want to improve this post? Provide detailed answers to this question, including citations and an explanation of why your answer is correct. Answers without enough detail may be edited or deleted.
|
9,754
|
Real life examples of distributions with negative skewness
|
In random matrix theory, the Tracy Widom distribution is right-skewed. This is the distribution of the largest eigenvalue of a random matrix. By symmetry, the smallest eigenvalue has negative Tracy Widom distribution, and is therefore left-skewed.
This is roughly due to the fact that random eigenvalues are akin to charged particles that repel each-other, and hence the largest eigenvalue tends to be pushed away from the rest. Here's an exaggerated picture (taken from here) :
|
Real life examples of distributions with negative skewness
|
In random matrix theory, the Tracy Widom distribution is right-skewed. This is the distribution of the largest eigenvalue of a random matrix. By symmetry, the smallest eigenvalue has negative Tracy Wi
|
Real life examples of distributions with negative skewness
In random matrix theory, the Tracy Widom distribution is right-skewed. This is the distribution of the largest eigenvalue of a random matrix. By symmetry, the smallest eigenvalue has negative Tracy Widom distribution, and is therefore left-skewed.
This is roughly due to the fact that random eigenvalues are akin to charged particles that repel each-other, and hence the largest eigenvalue tends to be pushed away from the rest. Here's an exaggerated picture (taken from here) :
|
Real life examples of distributions with negative skewness
In random matrix theory, the Tracy Widom distribution is right-skewed. This is the distribution of the largest eigenvalue of a random matrix. By symmetry, the smallest eigenvalue has negative Tracy Wi
|
9,755
|
How to add non-linear trend line to a scatter plot in R? [closed]
|
Let's create some data.
n <- 100
x <- seq(n)
y <- rnorm(n, 50 + 30 * x^(-0.2), 1)
Data <- data.frame(x, y)
The following shows how you can fit a loess line or the fit of a non-linear regression.
plot(y ~ x, Data)
# fit a loess line
loess_fit <- loess(y ~ x, Data)
lines(Data$x, predict(loess_fit), col = "blue")
# fit a non-linear regression
nls_fit <- nls(y ~ a + b * x^(-c), Data, start = list(a = 80, b = 20,
c = 0.2))
lines(Data$x, predict(nls_fit), col = "red")
|
How to add non-linear trend line to a scatter plot in R? [closed]
|
Let's create some data.
n <- 100
x <- seq(n)
y <- rnorm(n, 50 + 30 * x^(-0.2), 1)
Data <- data.frame(x, y)
The following shows how you can fit a loess line or the fit of a non-linear regression.
plot
|
How to add non-linear trend line to a scatter plot in R? [closed]
Let's create some data.
n <- 100
x <- seq(n)
y <- rnorm(n, 50 + 30 * x^(-0.2), 1)
Data <- data.frame(x, y)
The following shows how you can fit a loess line or the fit of a non-linear regression.
plot(y ~ x, Data)
# fit a loess line
loess_fit <- loess(y ~ x, Data)
lines(Data$x, predict(loess_fit), col = "blue")
# fit a non-linear regression
nls_fit <- nls(y ~ a + b * x^(-c), Data, start = list(a = 80, b = 20,
c = 0.2))
lines(Data$x, predict(nls_fit), col = "red")
|
How to add non-linear trend line to a scatter plot in R? [closed]
Let's create some data.
n <- 100
x <- seq(n)
y <- rnorm(n, 50 + 30 * x^(-0.2), 1)
Data <- data.frame(x, y)
The following shows how you can fit a loess line or the fit of a non-linear regression.
plot
|
9,756
|
How to add non-linear trend line to a scatter plot in R? [closed]
|
If you use ggplot2 (the third plotting system, in R, after base R and lattice), this becomes:
library(ggplot2)
ggplot(Data, aes(x,y)) + geom_point() + geom_smooth()
You can choose how the data is smoothed: see ?stat_smooth for details and examples.
|
How to add non-linear trend line to a scatter plot in R? [closed]
|
If you use ggplot2 (the third plotting system, in R, after base R and lattice), this becomes:
library(ggplot2)
ggplot(Data, aes(x,y)) + geom_point() + geom_smooth()
You can choose how the data is sm
|
How to add non-linear trend line to a scatter plot in R? [closed]
If you use ggplot2 (the third plotting system, in R, after base R and lattice), this becomes:
library(ggplot2)
ggplot(Data, aes(x,y)) + geom_point() + geom_smooth()
You can choose how the data is smoothed: see ?stat_smooth for details and examples.
|
How to add non-linear trend line to a scatter plot in R? [closed]
If you use ggplot2 (the third plotting system, in R, after base R and lattice), this becomes:
library(ggplot2)
ggplot(Data, aes(x,y)) + geom_point() + geom_smooth()
You can choose how the data is sm
|
9,757
|
How to add non-linear trend line to a scatter plot in R? [closed]
|
Without knowing exactly what you are looking for, using the lattice package you can easily add a loess curve with type="smooth"; e.g.,
> library(lattice)
> x <- rnorm(100)
> y <- rnorm(100)
> xyplot(y ~ x, type=c("smooth", "p"))
See help("panel.loess") for arguments that can be passed to the loess fitting routine in order to change, for instance, the degree of the polynomial to use.
Update
To change the color of the loess curve, you can write a small function and pass it as a panel parameter to xyplot:
x <- rnorm(100)
y <- rnorm(100)
panel_fn <- function(x, y, ...)
{
panel.xyplot(x, y, ...)
panel.xyplot(x, y, type="smooth", col="red", ...)
}
xyplot(y ~ x, panel=panel_fn)
|
How to add non-linear trend line to a scatter plot in R? [closed]
|
Without knowing exactly what you are looking for, using the lattice package you can easily add a loess curve with type="smooth"; e.g.,
> library(lattice)
> x <- rnorm(100)
> y <- rnorm(100)
> xyplot(y
|
How to add non-linear trend line to a scatter plot in R? [closed]
Without knowing exactly what you are looking for, using the lattice package you can easily add a loess curve with type="smooth"; e.g.,
> library(lattice)
> x <- rnorm(100)
> y <- rnorm(100)
> xyplot(y ~ x, type=c("smooth", "p"))
See help("panel.loess") for arguments that can be passed to the loess fitting routine in order to change, for instance, the degree of the polynomial to use.
Update
To change the color of the loess curve, you can write a small function and pass it as a panel parameter to xyplot:
x <- rnorm(100)
y <- rnorm(100)
panel_fn <- function(x, y, ...)
{
panel.xyplot(x, y, ...)
panel.xyplot(x, y, type="smooth", col="red", ...)
}
xyplot(y ~ x, panel=panel_fn)
|
How to add non-linear trend line to a scatter plot in R? [closed]
Without knowing exactly what you are looking for, using the lattice package you can easily add a loess curve with type="smooth"; e.g.,
> library(lattice)
> x <- rnorm(100)
> y <- rnorm(100)
> xyplot(y
|
9,758
|
How to add non-linear trend line to a scatter plot in R? [closed]
|
Your question is a bit vague, so I'm going to make some assumptions about what your problem is. It would help a lot if you could put up a scatterplot and describe the data a bit. Please, if I'm making bad assumptions then ignore my answer.
First, it's possible that your data describe some process which you reasonably believe is non-linear. For instance, if you're trying to do regression on the distance for a car to stop with sudden braking vs the speed of the car, physics tells us that the energy of the vehicle is proportional to the square of the velocity - not the velocity itself. So you might want to try polynomial regression in this case, and (in R) you could do something like model <- lm(d ~ poly(v,2),data=dataset). There's a lot of documentation on how to get various non-linearities into the regression model.
On the other hand, if you've got a line which is "wobbly" and you don't know why it's wobbly, then a good starting point would probably be locally weighted regression, or loess in R. This does linear regression on a small region, as opposed to the whole dataset. It's easiest to imagine a "k nearest-neighbour" version, where to calculate the value of the curve at any point, you find the k points nearest to the point of interest, and average them. Loess is just like that but uses regression instead of a straight average. For this, use model <- loess(y ~ x, data=dataset, span=...), where the span variable controls the degree of smoothing.
On the third hand (running out of hands) - you're talking about trends? Is this a temporal problem? If it is, be a little cautious with over interpreting trend lines and statistical significance. Trends in time series can appear in "autoregressive" processes, and for these processes the randomness of the process can occasionally construct trends out of random noise, and the wrong statistical significance test can tell you it's significant when it's not!
|
How to add non-linear trend line to a scatter plot in R? [closed]
|
Your question is a bit vague, so I'm going to make some assumptions about what your problem is. It would help a lot if you could put up a scatterplot and describe the data a bit. Please, if I'm making
|
How to add non-linear trend line to a scatter plot in R? [closed]
Your question is a bit vague, so I'm going to make some assumptions about what your problem is. It would help a lot if you could put up a scatterplot and describe the data a bit. Please, if I'm making bad assumptions then ignore my answer.
First, it's possible that your data describe some process which you reasonably believe is non-linear. For instance, if you're trying to do regression on the distance for a car to stop with sudden braking vs the speed of the car, physics tells us that the energy of the vehicle is proportional to the square of the velocity - not the velocity itself. So you might want to try polynomial regression in this case, and (in R) you could do something like model <- lm(d ~ poly(v,2),data=dataset). There's a lot of documentation on how to get various non-linearities into the regression model.
On the other hand, if you've got a line which is "wobbly" and you don't know why it's wobbly, then a good starting point would probably be locally weighted regression, or loess in R. This does linear regression on a small region, as opposed to the whole dataset. It's easiest to imagine a "k nearest-neighbour" version, where to calculate the value of the curve at any point, you find the k points nearest to the point of interest, and average them. Loess is just like that but uses regression instead of a straight average. For this, use model <- loess(y ~ x, data=dataset, span=...), where the span variable controls the degree of smoothing.
On the third hand (running out of hands) - you're talking about trends? Is this a temporal problem? If it is, be a little cautious with over interpreting trend lines and statistical significance. Trends in time series can appear in "autoregressive" processes, and for these processes the randomness of the process can occasionally construct trends out of random noise, and the wrong statistical significance test can tell you it's significant when it's not!
|
How to add non-linear trend line to a scatter plot in R? [closed]
Your question is a bit vague, so I'm going to make some assumptions about what your problem is. It would help a lot if you could put up a scatterplot and describe the data a bit. Please, if I'm making
|
9,759
|
How to add non-linear trend line to a scatter plot in R? [closed]
|
Putting scatter plot sample points and smooth curve on same graph:
library(graphics)
## Create some x,y sample points falling on hyperbola, but with error:
xSample = seq(0.1, 1.0, 0.1)
ySample = 1.0 / xSample
numPts <- length(xSample)
ySample <- ySample + 0.5 * rnorm(numPts) ## Add some noise
## Create x,y points for smooth hyperbola:
xCurve <- seq(0.1, 1.0, 0.001)
yCurve <- 1.0 / xCurve
plot(xSample, ySample, ylim = c(0.0, 12.0)) ## Plot the sample points
lines(xCurve, yCurve, col = 'green', lty = 1) ## Plot the curve
|
How to add non-linear trend line to a scatter plot in R? [closed]
|
Putting scatter plot sample points and smooth curve on same graph:
library(graphics)
## Create some x,y sample points falling on hyperbola, but with error:
xSample = seq(0.1, 1.0, 0.1)
ySample
|
How to add non-linear trend line to a scatter plot in R? [closed]
Putting scatter plot sample points and smooth curve on same graph:
library(graphics)
## Create some x,y sample points falling on hyperbola, but with error:
xSample = seq(0.1, 1.0, 0.1)
ySample = 1.0 / xSample
numPts <- length(xSample)
ySample <- ySample + 0.5 * rnorm(numPts) ## Add some noise
## Create x,y points for smooth hyperbola:
xCurve <- seq(0.1, 1.0, 0.001)
yCurve <- 1.0 / xCurve
plot(xSample, ySample, ylim = c(0.0, 12.0)) ## Plot the sample points
lines(xCurve, yCurve, col = 'green', lty = 1) ## Plot the curve
|
How to add non-linear trend line to a scatter plot in R? [closed]
Putting scatter plot sample points and smooth curve on same graph:
library(graphics)
## Create some x,y sample points falling on hyperbola, but with error:
xSample = seq(0.1, 1.0, 0.1)
ySample
|
9,760
|
Expectation of reciprocal of a variable
|
can it be 1/E(X)?
No, in general it can't; Jensen's inequality tells us that if $X$ is a random variable and $\varphi$ is a convex function, then $\varphi(\text{E}[X]) \leq \text{E}\left[\varphi(X)\right]$. If $X$ is strictly positive, then $1/X$ is convex, so $\text{E}[1/X]\geq 1/\text{E}[X]$, and for a strictly convex function, equality only occurs if $X$ has zero variance ... so in cases we tend to be interested in, the two are generally unequal.
Assuming we're dealing with a positive variable, if it's clear to you that $X$ and $1/X$ will be inversely related ($\text{Cov}(X,1/X)\leq 0$) then this would imply $E(X \cdot 1/X) - E(X) E(1/X) \leq 0$ which implies $E(X) E(1/X) \geq 1$, so $E(1/X) \geq 1/E(X)$.
I am confused in applying expectation in denominator.
Use the law of the unconscious statistician
$$\text{E}[g(X)] = \int_{-\infty}^\infty g(x) f_X(x) dx$$
(in the continuous case)
so when $g(X) = \frac{1}{X}$, $\text{E}[\frac{1}{X}]=\int_{-\infty}^\infty \frac{f(x)}{x} dx$
In some cases the expectation can be evaluated by inspection (e.g. with gamma random variables), or by deriving the distribution of the inverse, or by other means.
|
Expectation of reciprocal of a variable
|
can it be 1/E(X)?
No, in general it can't; Jensen's inequality tells us that if $X$ is a random variable and $\varphi$ is a convex function, then $\varphi(\text{E}[X]) \leq \text{E}\left[\varphi(X)\r
|
Expectation of reciprocal of a variable
can it be 1/E(X)?
No, in general it can't; Jensen's inequality tells us that if $X$ is a random variable and $\varphi$ is a convex function, then $\varphi(\text{E}[X]) \leq \text{E}\left[\varphi(X)\right]$. If $X$ is strictly positive, then $1/X$ is convex, so $\text{E}[1/X]\geq 1/\text{E}[X]$, and for a strictly convex function, equality only occurs if $X$ has zero variance ... so in cases we tend to be interested in, the two are generally unequal.
Assuming we're dealing with a positive variable, if it's clear to you that $X$ and $1/X$ will be inversely related ($\text{Cov}(X,1/X)\leq 0$) then this would imply $E(X \cdot 1/X) - E(X) E(1/X) \leq 0$ which implies $E(X) E(1/X) \geq 1$, so $E(1/X) \geq 1/E(X)$.
I am confused in applying expectation in denominator.
Use the law of the unconscious statistician
$$\text{E}[g(X)] = \int_{-\infty}^\infty g(x) f_X(x) dx$$
(in the continuous case)
so when $g(X) = \frac{1}{X}$, $\text{E}[\frac{1}{X}]=\int_{-\infty}^\infty \frac{f(x)}{x} dx$
In some cases the expectation can be evaluated by inspection (e.g. with gamma random variables), or by deriving the distribution of the inverse, or by other means.
|
Expectation of reciprocal of a variable
can it be 1/E(X)?
No, in general it can't; Jensen's inequality tells us that if $X$ is a random variable and $\varphi$ is a convex function, then $\varphi(\text{E}[X]) \leq \text{E}\left[\varphi(X)\r
|
9,761
|
Expectation of reciprocal of a variable
|
As Glen_b says that's probably wrong, because the reciprocal is a non-linear function. If you want an approximation to $E(1/X)$ maybe you can use a Taylor expansion around $E(X)$:
$$
E \bigg( \frac{1}{X} \bigg) \approx E\bigg( \frac{1}{E(X)} - \frac{1}{E(X)^2}(X-E(X)) + \frac{1}{E(X)^3}(X - E(X))^2 \bigg) = \\
= \frac{1}{E(X)} + \frac{1}{E(X)^3}Var(X)
$$
so you just need mean and variance of X, and if the distribution of $X$ is symmetric this approximation can be very accurate.
EDIT: the maybe above is quite critical, see the comment from BioXX below.
|
Expectation of reciprocal of a variable
|
As Glen_b says that's probably wrong, because the reciprocal is a non-linear function. If you want an approximation to $E(1/X)$ maybe you can use a Taylor expansion around $E(X)$:
$$
E \bigg( \frac{1}
|
Expectation of reciprocal of a variable
As Glen_b says that's probably wrong, because the reciprocal is a non-linear function. If you want an approximation to $E(1/X)$ maybe you can use a Taylor expansion around $E(X)$:
$$
E \bigg( \frac{1}{X} \bigg) \approx E\bigg( \frac{1}{E(X)} - \frac{1}{E(X)^2}(X-E(X)) + \frac{1}{E(X)^3}(X - E(X))^2 \bigg) = \\
= \frac{1}{E(X)} + \frac{1}{E(X)^3}Var(X)
$$
so you just need mean and variance of X, and if the distribution of $X$ is symmetric this approximation can be very accurate.
EDIT: the maybe above is quite critical, see the comment from BioXX below.
|
Expectation of reciprocal of a variable
As Glen_b says that's probably wrong, because the reciprocal is a non-linear function. If you want an approximation to $E(1/X)$ maybe you can use a Taylor expansion around $E(X)$:
$$
E \bigg( \frac{1}
|
9,762
|
Expectation of reciprocal of a variable
|
Others have already explained that the answer to the question is NO, except trivial cases. Below we give an approach to finding $\DeclareMathOperator{\E}{\mathbb{E}} \E \frac1{X}$ when $X>0$ with probability one, and the moment generating function $M_X(t) = \E e^{tX}$ do exist. An application of this method (and a generalization) is given in Expected value of $1/x$ when $x$ follows a Beta distribution, we will here also give a simpler example.
First, note that $\int_0^\infty e^{-t x}\; dt = \frac1{x}$ (simple calculus exercise). Then, write
$$
\E \left(\frac1{X}\right) = \int_0^\infty x^{-1} f(x)\; dx =
\int_0^\infty \left( \int_0^\infty e^{-tx}\; dt \right) f(x)\; dx =\\
\int_0^\infty \left( \int_0^\infty e^{-tx} f(x) \; dx \right) \; dt =
\int_0^\infty M_X(-t) \; dt
$$
A simple application: Let $X$ have the exponential distribution with rate 1, that is, with density $e^{-x}, x>0$ and moment generating function $M_X(t)=\frac1{1-t}, t<1$. Then $\int_0^\infty M_X(-t)\; dt = \int_0^\infty \frac1{1+t} \; dt= \ln(1+t) \bigg\rvert_0^\infty = \infty$, so definitely do not converge, and is very different from $\frac1{\E X}=\frac11=1$.
|
Expectation of reciprocal of a variable
|
Others have already explained that the answer to the question is NO, except trivial cases. Below we give an approach to finding $\DeclareMathOperator{\E}{\mathbb{E}} \E \frac1{X}$ when $X>0$ with pro
|
Expectation of reciprocal of a variable
Others have already explained that the answer to the question is NO, except trivial cases. Below we give an approach to finding $\DeclareMathOperator{\E}{\mathbb{E}} \E \frac1{X}$ when $X>0$ with probability one, and the moment generating function $M_X(t) = \E e^{tX}$ do exist. An application of this method (and a generalization) is given in Expected value of $1/x$ when $x$ follows a Beta distribution, we will here also give a simpler example.
First, note that $\int_0^\infty e^{-t x}\; dt = \frac1{x}$ (simple calculus exercise). Then, write
$$
\E \left(\frac1{X}\right) = \int_0^\infty x^{-1} f(x)\; dx =
\int_0^\infty \left( \int_0^\infty e^{-tx}\; dt \right) f(x)\; dx =\\
\int_0^\infty \left( \int_0^\infty e^{-tx} f(x) \; dx \right) \; dt =
\int_0^\infty M_X(-t) \; dt
$$
A simple application: Let $X$ have the exponential distribution with rate 1, that is, with density $e^{-x}, x>0$ and moment generating function $M_X(t)=\frac1{1-t}, t<1$. Then $\int_0^\infty M_X(-t)\; dt = \int_0^\infty \frac1{1+t} \; dt= \ln(1+t) \bigg\rvert_0^\infty = \infty$, so definitely do not converge, and is very different from $\frac1{\E X}=\frac11=1$.
|
Expectation of reciprocal of a variable
Others have already explained that the answer to the question is NO, except trivial cases. Below we give an approach to finding $\DeclareMathOperator{\E}{\mathbb{E}} \E \frac1{X}$ when $X>0$ with pro
|
9,763
|
Expectation of reciprocal of a variable
|
An alternative approach to calculating $E(1/X)$ knowing X is a positive random variable is through its moment generating function $E[e^{-\lambda X}]$.
Since by elementary calculas
$$
\int_0^\infty e^{-\lambda x} d\lambda =\frac{1}{x}
$$
we have, by Fubini's theorem
$$
\int_0^\infty E[e^{-\lambda X}] d\lambda =E[\frac{1}{X}].
$$
|
Expectation of reciprocal of a variable
|
An alternative approach to calculating $E(1/X)$ knowing X is a positive random variable is through its moment generating function $E[e^{-\lambda X}]$.
Since by elementary calculas
$$
\int_0^\infty
|
Expectation of reciprocal of a variable
An alternative approach to calculating $E(1/X)$ knowing X is a positive random variable is through its moment generating function $E[e^{-\lambda X}]$.
Since by elementary calculas
$$
\int_0^\infty e^{-\lambda x} d\lambda =\frac{1}{x}
$$
we have, by Fubini's theorem
$$
\int_0^\infty E[e^{-\lambda X}] d\lambda =E[\frac{1}{X}].
$$
|
Expectation of reciprocal of a variable
An alternative approach to calculating $E(1/X)$ knowing X is a positive random variable is through its moment generating function $E[e^{-\lambda X}]$.
Since by elementary calculas
$$
\int_0^\infty
|
9,764
|
Expectation of reciprocal of a variable
|
To first give an intuition, what about using the discrete case in finite sample to illustrate that $\text{E}(1/X)\neq 1/\text{E}(X)$ (putting aside cases such as $\text{E}(X)=0$)?
In finite sample, using the term average for expectation is not that abusive, thus if one has on the one hand
$\text{E}(X) = \frac{1}{N}\sum_{i=1}^N X_i$
and one has on the other hand
$\text{E}(1/X) = \frac{1}{N}\sum_{i=1}^N 1/X_i$
it becomes obvious that, with $N>1$,
$\text{E}(1/X) = \frac{1}{N}\sum_{i=1}^N 1/X_i \neq \frac{N}{\sum_{i=1}^N X_i} = 1/\text{E}(X)$
Which leads to say that, basically, $\text{E}(1/X)\neq 1/\text{E}(X)$ since the inverse of the (discrete) sum is not the (discrete) sum of inverses.
Analogously in the asymptotic $0$-centered continuous case, one has
$\text{E}(1/X)=\int_{-\infty}^\infty \frac{f(x)}{x} dx \neq 1/\int_{-\infty}^\infty xf(x) dx = 1/\text{E}(X)$.
|
Expectation of reciprocal of a variable
|
To first give an intuition, what about using the discrete case in finite sample to illustrate that $\text{E}(1/X)\neq 1/\text{E}(X)$ (putting aside cases such as $\text{E}(X)=0$)?
In finite sample, us
|
Expectation of reciprocal of a variable
To first give an intuition, what about using the discrete case in finite sample to illustrate that $\text{E}(1/X)\neq 1/\text{E}(X)$ (putting aside cases such as $\text{E}(X)=0$)?
In finite sample, using the term average for expectation is not that abusive, thus if one has on the one hand
$\text{E}(X) = \frac{1}{N}\sum_{i=1}^N X_i$
and one has on the other hand
$\text{E}(1/X) = \frac{1}{N}\sum_{i=1}^N 1/X_i$
it becomes obvious that, with $N>1$,
$\text{E}(1/X) = \frac{1}{N}\sum_{i=1}^N 1/X_i \neq \frac{N}{\sum_{i=1}^N X_i} = 1/\text{E}(X)$
Which leads to say that, basically, $\text{E}(1/X)\neq 1/\text{E}(X)$ since the inverse of the (discrete) sum is not the (discrete) sum of inverses.
Analogously in the asymptotic $0$-centered continuous case, one has
$\text{E}(1/X)=\int_{-\infty}^\infty \frac{f(x)}{x} dx \neq 1/\int_{-\infty}^\infty xf(x) dx = 1/\text{E}(X)$.
|
Expectation of reciprocal of a variable
To first give an intuition, what about using the discrete case in finite sample to illustrate that $\text{E}(1/X)\neq 1/\text{E}(X)$ (putting aside cases such as $\text{E}(X)=0$)?
In finite sample, us
|
9,765
|
What is the difference between convolutional neural networks and deep learning?
|
Deep Learning is the branch of Machine Learning based on Deep Neural Networks (DNNs), meaning neural networks with at the very least 3 or 4 layers (including the input and output layers). But for some people (especially non-technical), any neural net qualifies as Deep Learning, regardless of its depth. And others consider a 10-layer neural net as shallow.
Convolutional Neural Networks (CNNs) are one of the most popular neural network architectures. They are extremely successful at image processing, but also for many other tasks (such as speech recognition, natural language processing, and more). The state of the art CNNs are pretty deep (dozens of layers at least), so they are part of Deep Learning. But you can build a shallow CNN for a simple task, in which case it's not (really) Deep Learning.
But CNNs are not alone, there are many other neural network architectures out there, including Recurrent Neural Networks (RNN), Autoencoders, Transformers, Deep Belief Nets (DBN = a stack of Restricted Boltzmann Machines, RBM), and more. They can be shallow or deep. Note: even shallow RNNs can be considered part of Deep Learning since training them requires unrolling them through time, resulting in a deep net.
|
What is the difference between convolutional neural networks and deep learning?
|
Deep Learning is the branch of Machine Learning based on Deep Neural Networks (DNNs), meaning neural networks with at the very least 3 or 4 layers (including the input and output layers). But for some
|
What is the difference between convolutional neural networks and deep learning?
Deep Learning is the branch of Machine Learning based on Deep Neural Networks (DNNs), meaning neural networks with at the very least 3 or 4 layers (including the input and output layers). But for some people (especially non-technical), any neural net qualifies as Deep Learning, regardless of its depth. And others consider a 10-layer neural net as shallow.
Convolutional Neural Networks (CNNs) are one of the most popular neural network architectures. They are extremely successful at image processing, but also for many other tasks (such as speech recognition, natural language processing, and more). The state of the art CNNs are pretty deep (dozens of layers at least), so they are part of Deep Learning. But you can build a shallow CNN for a simple task, in which case it's not (really) Deep Learning.
But CNNs are not alone, there are many other neural network architectures out there, including Recurrent Neural Networks (RNN), Autoencoders, Transformers, Deep Belief Nets (DBN = a stack of Restricted Boltzmann Machines, RBM), and more. They can be shallow or deep. Note: even shallow RNNs can be considered part of Deep Learning since training them requires unrolling them through time, resulting in a deep net.
|
What is the difference between convolutional neural networks and deep learning?
Deep Learning is the branch of Machine Learning based on Deep Neural Networks (DNNs), meaning neural networks with at the very least 3 or 4 layers (including the input and output layers). But for some
|
9,766
|
What is the difference between convolutional neural networks and deep learning?
|
Within the fields of adaptive signal processing / machine learning, deep learning (DL) is a particular methodology in which we can train machines complex representations.
Generally, they will have a formulation that can map your input $\mathbf{x}$, all the way to the target objective, $\mathbf{y}$, via a series of hierarchically stacked (this is where the 'deep' comes from) operations. Those operations are typically linear operations/projections ($W_i$), followed by a non-linearities ($f_i$), like so:
$$
\mathbf{y} = f_N(...f_2(f_1(\mathbf{x}^T\mathbf{W}_1)\mathbf{W}_2)...\mathbf{W}_N)
$$
Now within DL, there are many different architectures: One such architecture is known as a convolutional neural net (CNN). Another architecture is known as a multi-layer perceptron, (MLP), etc. Different architectures lend themselves to solving different types of problems.
An MLP is perhaps one of the most traditional types of DL architectures one may find, and that's when every element of a previous layer, is connected to every element of the next layer. It looks like this:
In MLPs, the matricies $\mathbf{W}_i$ encode the transformation from one layer to another. (Via a matrix multiply). For example, if you have 10 neurons in one layer connected to 20 neurons of the next, then you will have a matrix $\mathbf{W} \in R^{10 \text{x} 20}$, that will map an input $\mathbf{v} \in R^{10 \text{x} 1}$ to an output $\mathbf{u} \in R^{1 \text{x} 20}$, via: $\mathbf{u} = \mathbf{v}^T \mathbf{W}$. Every column in $\mathbf{W}$, encodes all the edges going from all the elements of a layer, to one of the elements of the next layer.
MLPs fell out of favor then, in part because they were hard to train. While there are many reasons for that hardship, one of them was also because their dense connections didnt allow them to scale easily for various computer vision problems. In other words, they did not have translation-equivariance baked in. This meant that if there was a signal in one part of the image that they needed to be sensitive to, they would need to re-learn how to be sensitive to it if that signal moved around. This wasted the capacity of the net, and so training became hard.
This is where CNNs came in! Here is what one looks like:
CNNs solved the signal-translation problem, because they would convolve each input signal with a detector, (kernel), and thus be sensitive to the same feature, but this time everywhere. In that case, our equation still looks the same, but the weight matricies $\mathbf{W_i}$ are actually convolutional toeplitz matricies. The math is the same though.
It is common to see "CNNs" refer to nets where we have convolutional layers throughout the net, and MLPs at the very end, so that is one caveat to be aware of.
|
What is the difference between convolutional neural networks and deep learning?
|
Within the fields of adaptive signal processing / machine learning, deep learning (DL) is a particular methodology in which we can train machines complex representations.
Generally, they will have a
|
What is the difference between convolutional neural networks and deep learning?
Within the fields of adaptive signal processing / machine learning, deep learning (DL) is a particular methodology in which we can train machines complex representations.
Generally, they will have a formulation that can map your input $\mathbf{x}$, all the way to the target objective, $\mathbf{y}$, via a series of hierarchically stacked (this is where the 'deep' comes from) operations. Those operations are typically linear operations/projections ($W_i$), followed by a non-linearities ($f_i$), like so:
$$
\mathbf{y} = f_N(...f_2(f_1(\mathbf{x}^T\mathbf{W}_1)\mathbf{W}_2)...\mathbf{W}_N)
$$
Now within DL, there are many different architectures: One such architecture is known as a convolutional neural net (CNN). Another architecture is known as a multi-layer perceptron, (MLP), etc. Different architectures lend themselves to solving different types of problems.
An MLP is perhaps one of the most traditional types of DL architectures one may find, and that's when every element of a previous layer, is connected to every element of the next layer. It looks like this:
In MLPs, the matricies $\mathbf{W}_i$ encode the transformation from one layer to another. (Via a matrix multiply). For example, if you have 10 neurons in one layer connected to 20 neurons of the next, then you will have a matrix $\mathbf{W} \in R^{10 \text{x} 20}$, that will map an input $\mathbf{v} \in R^{10 \text{x} 1}$ to an output $\mathbf{u} \in R^{1 \text{x} 20}$, via: $\mathbf{u} = \mathbf{v}^T \mathbf{W}$. Every column in $\mathbf{W}$, encodes all the edges going from all the elements of a layer, to one of the elements of the next layer.
MLPs fell out of favor then, in part because they were hard to train. While there are many reasons for that hardship, one of them was also because their dense connections didnt allow them to scale easily for various computer vision problems. In other words, they did not have translation-equivariance baked in. This meant that if there was a signal in one part of the image that they needed to be sensitive to, they would need to re-learn how to be sensitive to it if that signal moved around. This wasted the capacity of the net, and so training became hard.
This is where CNNs came in! Here is what one looks like:
CNNs solved the signal-translation problem, because they would convolve each input signal with a detector, (kernel), and thus be sensitive to the same feature, but this time everywhere. In that case, our equation still looks the same, but the weight matricies $\mathbf{W_i}$ are actually convolutional toeplitz matricies. The math is the same though.
It is common to see "CNNs" refer to nets where we have convolutional layers throughout the net, and MLPs at the very end, so that is one caveat to be aware of.
|
What is the difference between convolutional neural networks and deep learning?
Within the fields of adaptive signal processing / machine learning, deep learning (DL) is a particular methodology in which we can train machines complex representations.
Generally, they will have a
|
9,767
|
What is the difference between convolutional neural networks and deep learning?
|
Deep learning = deep artificial neural networks + other kind of deep models.
Deep artificial neural networks = artificial neural networks with more than 1 layer. (see minimum number of layers in a deep neural network or Wikipedia for more debate…)
Convolution Neural Network = A type of artificial neural networks
|
What is the difference between convolutional neural networks and deep learning?
|
Deep learning = deep artificial neural networks + other kind of deep models.
Deep artificial neural networks = artificial neural networks with more than 1 layer. (see minimum number of layers in a dee
|
What is the difference between convolutional neural networks and deep learning?
Deep learning = deep artificial neural networks + other kind of deep models.
Deep artificial neural networks = artificial neural networks with more than 1 layer. (see minimum number of layers in a deep neural network or Wikipedia for more debate…)
Convolution Neural Network = A type of artificial neural networks
|
What is the difference between convolutional neural networks and deep learning?
Deep learning = deep artificial neural networks + other kind of deep models.
Deep artificial neural networks = artificial neural networks with more than 1 layer. (see minimum number of layers in a dee
|
9,768
|
What is the difference between convolutional neural networks and deep learning?
|
This slide by Yann LeCun makes the point that only models with a feature hierarchy (lower-level features are learned at one layer of a model, and then those features are combined at the next level) are deep.
A CNN can be deep or shallow; which is the case depends on whether it follows this "feature hierarchy" construction because certain neural networks, including 2-layer models, are not deep.
|
What is the difference between convolutional neural networks and deep learning?
|
This slide by Yann LeCun makes the point that only models with a feature hierarchy (lower-level features are learned at one layer of a model, and then those features are combined at the next level) ar
|
What is the difference between convolutional neural networks and deep learning?
This slide by Yann LeCun makes the point that only models with a feature hierarchy (lower-level features are learned at one layer of a model, and then those features are combined at the next level) are deep.
A CNN can be deep or shallow; which is the case depends on whether it follows this "feature hierarchy" construction because certain neural networks, including 2-layer models, are not deep.
|
What is the difference between convolutional neural networks and deep learning?
This slide by Yann LeCun makes the point that only models with a feature hierarchy (lower-level features are learned at one layer of a model, and then those features are combined at the next level) ar
|
9,769
|
What is the difference between convolutional neural networks and deep learning?
|
Deep learning is a general term for dealing with a complicated neural network with multiple layers. There is no standard definition of what exactly is deep. Usually, you can think a deep network is something that is too big for your laptop and PC to train. The data set would be so huge that you can't fit it into your memory. You might need GPU to speed up your training.
Deep is more like a marketing term to make something sounds more professional than otherwise.
CNN is a type of deep neural network, and there are many other types. CNNs are popular because they have very useful applications to image recognition.
|
What is the difference between convolutional neural networks and deep learning?
|
Deep learning is a general term for dealing with a complicated neural network with multiple layers. There is no standard definition of what exactly is deep. Usually, you can think a deep network is so
|
What is the difference between convolutional neural networks and deep learning?
Deep learning is a general term for dealing with a complicated neural network with multiple layers. There is no standard definition of what exactly is deep. Usually, you can think a deep network is something that is too big for your laptop and PC to train. The data set would be so huge that you can't fit it into your memory. You might need GPU to speed up your training.
Deep is more like a marketing term to make something sounds more professional than otherwise.
CNN is a type of deep neural network, and there are many other types. CNNs are popular because they have very useful applications to image recognition.
|
What is the difference between convolutional neural networks and deep learning?
Deep learning is a general term for dealing with a complicated neural network with multiple layers. There is no standard definition of what exactly is deep. Usually, you can think a deep network is so
|
9,770
|
How to describe statistics in one sentence?
|
Statistics provides the reasoning and methods for producing and understanding data.
American Statistical Association
|
How to describe statistics in one sentence?
|
Statistics provides the reasoning and methods for producing and understanding data.
American Statistical Association
|
How to describe statistics in one sentence?
Statistics provides the reasoning and methods for producing and understanding data.
American Statistical Association
|
How to describe statistics in one sentence?
Statistics provides the reasoning and methods for producing and understanding data.
American Statistical Association
|
9,771
|
How to describe statistics in one sentence?
|
Statistics is fundamentally concerned with the understanding of structure in data.
Bill Venables and Brian Ripley, first sentence in Chapter 1 of Modern Applied Statistics with S
|
How to describe statistics in one sentence?
|
Statistics is fundamentally concerned with the understanding of structure in data.
Bill Venables and Brian Ripley, first sentence in Chapter 1 of Modern Applied Statistics with S
|
How to describe statistics in one sentence?
Statistics is fundamentally concerned with the understanding of structure in data.
Bill Venables and Brian Ripley, first sentence in Chapter 1 of Modern Applied Statistics with S
|
How to describe statistics in one sentence?
Statistics is fundamentally concerned with the understanding of structure in data.
Bill Venables and Brian Ripley, first sentence in Chapter 1 of Modern Applied Statistics with S
|
9,772
|
How to describe statistics in one sentence?
|
Statistics provides the reasoning and methods for converting data to meaningful information.
|
How to describe statistics in one sentence?
|
Statistics provides the reasoning and methods for converting data to meaningful information.
|
How to describe statistics in one sentence?
Statistics provides the reasoning and methods for converting data to meaningful information.
|
How to describe statistics in one sentence?
Statistics provides the reasoning and methods for converting data to meaningful information.
|
9,773
|
How to describe statistics in one sentence?
|
In the words of the late Leo Breiman:
The goals in statistics are to use data to predict and to get
information about the underlying data mechanism.
http://projecteuclid.org/euclid.ss/1009213726
|
How to describe statistics in one sentence?
|
In the words of the late Leo Breiman:
The goals in statistics are to use data to predict and to get
information about the underlying data mechanism.
http://projecteuclid.org/euclid.ss/1009213726
|
How to describe statistics in one sentence?
In the words of the late Leo Breiman:
The goals in statistics are to use data to predict and to get
information about the underlying data mechanism.
http://projecteuclid.org/euclid.ss/1009213726
|
How to describe statistics in one sentence?
In the words of the late Leo Breiman:
The goals in statistics are to use data to predict and to get
information about the underlying data mechanism.
http://projecteuclid.org/euclid.ss/1009213726
|
9,774
|
How to describe statistics in one sentence?
|
Personally, I like the following quote from Stephen Senn in Dicing with death. Chance, Risk and Health (Cambridge University Press, 2003). I highlighted one sentence (or two) that, I believe, summarize his main point, although the whole paragraph is worth reading.
Statistics are and statistics is.
Statistics, singular, contrary to the popular perception, is not really about facts; it is about how we know, or suspect, or believe, that something is a fact. Because knowing about things involves counting and measuring them, then, it is true, that statistics plural are part of the concern of statistics singular, which is the science of quantitative reasoning. This science has much more in common with philosophy (in particular epistemology) than it does with accounting. Statisticians are applied philosophers. Philosophers argue how many angels can dance on the head of a needle; statisticians count them.
Or rather, count how many can probably dance. Probability is the heart of the matter, the heart of all matter if the quantum physicists can be believed. As far as the statistician is concerned this is true, whether the world is strictly deterministic as Einstein believed or whether there is a residual ineluctable indeterminacy. We can predict nothing with certainty but we can predict how uncertain our predictions will be, on average that is. Statistics is the science that tells us how.
|
How to describe statistics in one sentence?
|
Personally, I like the following quote from Stephen Senn in Dicing with death. Chance, Risk and Health (Cambridge University Press, 2003). I highlighted one sentence (or two) that, I believe, summariz
|
How to describe statistics in one sentence?
Personally, I like the following quote from Stephen Senn in Dicing with death. Chance, Risk and Health (Cambridge University Press, 2003). I highlighted one sentence (or two) that, I believe, summarize his main point, although the whole paragraph is worth reading.
Statistics are and statistics is.
Statistics, singular, contrary to the popular perception, is not really about facts; it is about how we know, or suspect, or believe, that something is a fact. Because knowing about things involves counting and measuring them, then, it is true, that statistics plural are part of the concern of statistics singular, which is the science of quantitative reasoning. This science has much more in common with philosophy (in particular epistemology) than it does with accounting. Statisticians are applied philosophers. Philosophers argue how many angels can dance on the head of a needle; statisticians count them.
Or rather, count how many can probably dance. Probability is the heart of the matter, the heart of all matter if the quantum physicists can be believed. As far as the statistician is concerned this is true, whether the world is strictly deterministic as Einstein believed or whether there is a residual ineluctable indeterminacy. We can predict nothing with certainty but we can predict how uncertain our predictions will be, on average that is. Statistics is the science that tells us how.
|
How to describe statistics in one sentence?
Personally, I like the following quote from Stephen Senn in Dicing with death. Chance, Risk and Health (Cambridge University Press, 2003). I highlighted one sentence (or two) that, I believe, summariz
|
9,775
|
How to describe statistics in one sentence?
|
Statistics is the science of learning from data and measuring, controlling, and communicating uncertainty.
Marie Davidian & Thomas Louis
They continue:
; and it thereby provides the navigation essential for controlling the course of scientific and societal advances
|
How to describe statistics in one sentence?
|
Statistics is the science of learning from data and measuring, controlling, and communicating uncertainty.
Marie Davidian & Thomas Louis
They continue:
; and it thereby provides the navigation essen
|
How to describe statistics in one sentence?
Statistics is the science of learning from data and measuring, controlling, and communicating uncertainty.
Marie Davidian & Thomas Louis
They continue:
; and it thereby provides the navigation essential for controlling the course of scientific and societal advances
|
How to describe statistics in one sentence?
Statistics is the science of learning from data and measuring, controlling, and communicating uncertainty.
Marie Davidian & Thomas Louis
They continue:
; and it thereby provides the navigation essen
|
9,776
|
How to describe statistics in one sentence?
|
Statistics is a kitbag of methods and modes of thought that help people to make clear conclusions from noisy information.
|
How to describe statistics in one sentence?
|
Statistics is a kitbag of methods and modes of thought that help people to make clear conclusions from noisy information.
|
How to describe statistics in one sentence?
Statistics is a kitbag of methods and modes of thought that help people to make clear conclusions from noisy information.
|
How to describe statistics in one sentence?
Statistics is a kitbag of methods and modes of thought that help people to make clear conclusions from noisy information.
|
9,777
|
How to describe statistics in one sentence?
|
Because we are not a godlike all-knowing creature we have to deal with uncertainty and Statistics provides methods to incorporate and reflect that uncertainty.
|
How to describe statistics in one sentence?
|
Because we are not a godlike all-knowing creature we have to deal with uncertainty and Statistics provides methods to incorporate and reflect that uncertainty.
|
How to describe statistics in one sentence?
Because we are not a godlike all-knowing creature we have to deal with uncertainty and Statistics provides methods to incorporate and reflect that uncertainty.
|
How to describe statistics in one sentence?
Because we are not a godlike all-knowing creature we have to deal with uncertainty and Statistics provides methods to incorporate and reflect that uncertainty.
|
9,778
|
How to describe statistics in one sentence?
|
statistics is a sub-field of philosophy that deals with the following question 'how we learn from observations' using rigorous mathematical concepts.
just a side note you can make 'one sentence' very long, there is a book written by B. Hrabal that consist of one long sentence, see:
Dancing Lessons for the Advanced in Age
|
How to describe statistics in one sentence?
|
statistics is a sub-field of philosophy that deals with the following question 'how we learn from observations' using rigorous mathematical concepts.
just a side note you can make 'one sentence' very
|
How to describe statistics in one sentence?
statistics is a sub-field of philosophy that deals with the following question 'how we learn from observations' using rigorous mathematical concepts.
just a side note you can make 'one sentence' very long, there is a book written by B. Hrabal that consist of one long sentence, see:
Dancing Lessons for the Advanced in Age
|
How to describe statistics in one sentence?
statistics is a sub-field of philosophy that deals with the following question 'how we learn from observations' using rigorous mathematical concepts.
just a side note you can make 'one sentence' very
|
9,779
|
How to describe statistics in one sentence?
|
Statistics is both the science of uncertainty and the technology of
extracting information from data
David J. Hand
|
How to describe statistics in one sentence?
|
Statistics is both the science of uncertainty and the technology of
extracting information from data
David J. Hand
|
How to describe statistics in one sentence?
Statistics is both the science of uncertainty and the technology of
extracting information from data
David J. Hand
|
How to describe statistics in one sentence?
Statistics is both the science of uncertainty and the technology of
extracting information from data
David J. Hand
|
9,780
|
How to describe statistics in one sentence?
|
Statistics is a set of logical principles and mathematical methods for summarizing quantified information in accurate, relevant ways.
|
How to describe statistics in one sentence?
|
Statistics is a set of logical principles and mathematical methods for summarizing quantified information in accurate, relevant ways.
|
How to describe statistics in one sentence?
Statistics is a set of logical principles and mathematical methods for summarizing quantified information in accurate, relevant ways.
|
How to describe statistics in one sentence?
Statistics is a set of logical principles and mathematical methods for summarizing quantified information in accurate, relevant ways.
|
9,781
|
How to describe statistics in one sentence?
|
In my own words
Statistics is the science of what might be
This is sort of tongue-in-cheek.
|
How to describe statistics in one sentence?
|
In my own words
Statistics is the science of what might be
This is sort of tongue-in-cheek.
|
How to describe statistics in one sentence?
In my own words
Statistics is the science of what might be
This is sort of tongue-in-cheek.
|
How to describe statistics in one sentence?
In my own words
Statistics is the science of what might be
This is sort of tongue-in-cheek.
|
9,782
|
How to describe statistics in one sentence?
|
Fisher (1922) gave his view on the essence of statistics in the following quote (bold font added by me for the one sentence requirement):
In order to arrive at a distinct formulation of statistical problems, it is necessary to define the task which the statistician sets himself: briefly, and in its most concrete form, the object of statistical methods is the reduction of data. A quantity of data, which usually by its mere bulk is incapable of entering the mind, is to be replaced by relatively few quantities which shall adequately represent the whole, or which, in other words, shall contain as much as possible, ideally the whole, of the relevant information contained in the original data.
|
How to describe statistics in one sentence?
|
Fisher (1922) gave his view on the essence of statistics in the following quote (bold font added by me for the one sentence requirement):
In order to arrive at a distinct formulation of statistical p
|
How to describe statistics in one sentence?
Fisher (1922) gave his view on the essence of statistics in the following quote (bold font added by me for the one sentence requirement):
In order to arrive at a distinct formulation of statistical problems, it is necessary to define the task which the statistician sets himself: briefly, and in its most concrete form, the object of statistical methods is the reduction of data. A quantity of data, which usually by its mere bulk is incapable of entering the mind, is to be replaced by relatively few quantities which shall adequately represent the whole, or which, in other words, shall contain as much as possible, ideally the whole, of the relevant information contained in the original data.
|
How to describe statistics in one sentence?
Fisher (1922) gave his view on the essence of statistics in the following quote (bold font added by me for the one sentence requirement):
In order to arrive at a distinct formulation of statistical p
|
9,783
|
How to describe statistics in one sentence?
|
A results-oriented (and so not really descriptive) one-liner would be, for me,
Statistics is what makes the human world go round, irrespective of what is that does the same for Nature.
|
How to describe statistics in one sentence?
|
A results-oriented (and so not really descriptive) one-liner would be, for me,
Statistics is what makes the human world go round, irrespective of what is that does the same for Nature.
|
How to describe statistics in one sentence?
A results-oriented (and so not really descriptive) one-liner would be, for me,
Statistics is what makes the human world go round, irrespective of what is that does the same for Nature.
|
How to describe statistics in one sentence?
A results-oriented (and so not really descriptive) one-liner would be, for me,
Statistics is what makes the human world go round, irrespective of what is that does the same for Nature.
|
9,784
|
How to describe statistics in one sentence?
|
Statistics is a tool for modeling the generation of data by uncertain and/or probabilistic processes.
|
How to describe statistics in one sentence?
|
Statistics is a tool for modeling the generation of data by uncertain and/or probabilistic processes.
|
How to describe statistics in one sentence?
Statistics is a tool for modeling the generation of data by uncertain and/or probabilistic processes.
|
How to describe statistics in one sentence?
Statistics is a tool for modeling the generation of data by uncertain and/or probabilistic processes.
|
9,785
|
How to describe statistics in one sentence?
|
A name for functions of the results of observations.
from here.
This is the meaning closest to that of OP. He's not talking about the branch of science. He means statistics such as mean and median. These are the functions on data
|
How to describe statistics in one sentence?
|
A name for functions of the results of observations.
from here.
This is the meaning closest to that of OP. He's not talking about the branch of science. He means statistics such as mean and median. T
|
How to describe statistics in one sentence?
A name for functions of the results of observations.
from here.
This is the meaning closest to that of OP. He's not talking about the branch of science. He means statistics such as mean and median. These are the functions on data
|
How to describe statistics in one sentence?
A name for functions of the results of observations.
from here.
This is the meaning closest to that of OP. He's not talking about the branch of science. He means statistics such as mean and median. T
|
9,786
|
How to describe statistics in one sentence?
|
Statistics is about torturing data long enough until it confess anything you want to show.
I am paraphrasing Ronald Coase, see link
|
How to describe statistics in one sentence?
|
Statistics is about torturing data long enough until it confess anything you want to show.
I am paraphrasing Ronald Coase, see link
|
How to describe statistics in one sentence?
Statistics is about torturing data long enough until it confess anything you want to show.
I am paraphrasing Ronald Coase, see link
|
How to describe statistics in one sentence?
Statistics is about torturing data long enough until it confess anything you want to show.
I am paraphrasing Ronald Coase, see link
|
9,787
|
How to describe statistics in one sentence?
|
Statistics is the mathematical science that allows you to figure out if the difference between sets of observations are just random or not.
|
How to describe statistics in one sentence?
|
Statistics is the mathematical science that allows you to figure out if the difference between sets of observations are just random or not.
|
How to describe statistics in one sentence?
Statistics is the mathematical science that allows you to figure out if the difference between sets of observations are just random or not.
|
How to describe statistics in one sentence?
Statistics is the mathematical science that allows you to figure out if the difference between sets of observations are just random or not.
|
9,788
|
Compute a cosine dissimilarity matrix in R [closed]
|
As @Max indicated in the comments (+1) it would be simpler to "write your own" than to spend time looking for it somewhere else. As we know, the cosine similarity between two vectors $A,B$ of length $n$ is
$$
C = \frac{ \sum \limits_{i=1}^{n}A_{i} B_{i} }{ \sqrt{\sum \limits_{i=1}^{n} A_{i}^2} \cdot \sqrt{\sum \limits_{i=1}^{n} B_{i}^2} } $$
which is straightforward to generate in R. Let X be the matrix where the rows are the values we want to compute the similarity between. Then we can compute the similarity matrix with the following R code:
cos.sim <- function(ix)
{
A = X[ix[1],]
B = X[ix[2],]
return( sum(A*B)/sqrt(sum(A^2)*sum(B^2)) )
}
n <- nrow(X)
cmb <- expand.grid(i=1:n, j=1:n)
C <- matrix(apply(cmb,1,cos.sim),n,n)
Then the matrix C is the cosine similarity matrix and you can pass it to whatever heatmap function you like (the only one I'm familiar with is image()).
|
Compute a cosine dissimilarity matrix in R [closed]
|
As @Max indicated in the comments (+1) it would be simpler to "write your own" than to spend time looking for it somewhere else. As we know, the cosine similarity between two vectors $A,B$ of length $
|
Compute a cosine dissimilarity matrix in R [closed]
As @Max indicated in the comments (+1) it would be simpler to "write your own" than to spend time looking for it somewhere else. As we know, the cosine similarity between two vectors $A,B$ of length $n$ is
$$
C = \frac{ \sum \limits_{i=1}^{n}A_{i} B_{i} }{ \sqrt{\sum \limits_{i=1}^{n} A_{i}^2} \cdot \sqrt{\sum \limits_{i=1}^{n} B_{i}^2} } $$
which is straightforward to generate in R. Let X be the matrix where the rows are the values we want to compute the similarity between. Then we can compute the similarity matrix with the following R code:
cos.sim <- function(ix)
{
A = X[ix[1],]
B = X[ix[2],]
return( sum(A*B)/sqrt(sum(A^2)*sum(B^2)) )
}
n <- nrow(X)
cmb <- expand.grid(i=1:n, j=1:n)
C <- matrix(apply(cmb,1,cos.sim),n,n)
Then the matrix C is the cosine similarity matrix and you can pass it to whatever heatmap function you like (the only one I'm familiar with is image()).
|
Compute a cosine dissimilarity matrix in R [closed]
As @Max indicated in the comments (+1) it would be simpler to "write your own" than to spend time looking for it somewhere else. As we know, the cosine similarity between two vectors $A,B$ of length $
|
9,789
|
Compute a cosine dissimilarity matrix in R [closed]
|
Many answers here are computationally inefficient, try this;
For cosine similarity matrix
Matrix <- as.matrix(DF)
sim <- Matrix / sqrt(rowSums(Matrix * Matrix))
sim <- sim %*% t(sim)
Convert to cosine dissimilarity matrix (distance matrix).
D_sim <- as.dist(1 - sim)
|
Compute a cosine dissimilarity matrix in R [closed]
|
Many answers here are computationally inefficient, try this;
For cosine similarity matrix
Matrix <- as.matrix(DF)
sim <- Matrix / sqrt(rowSums(Matrix * Matrix))
sim <- sim %*% t(sim)
Convert to cosi
|
Compute a cosine dissimilarity matrix in R [closed]
Many answers here are computationally inefficient, try this;
For cosine similarity matrix
Matrix <- as.matrix(DF)
sim <- Matrix / sqrt(rowSums(Matrix * Matrix))
sim <- sim %*% t(sim)
Convert to cosine dissimilarity matrix (distance matrix).
D_sim <- as.dist(1 - sim)
|
Compute a cosine dissimilarity matrix in R [closed]
Many answers here are computationally inefficient, try this;
For cosine similarity matrix
Matrix <- as.matrix(DF)
sim <- Matrix / sqrt(rowSums(Matrix * Matrix))
sim <- sim %*% t(sim)
Convert to cosi
|
9,790
|
Compute a cosine dissimilarity matrix in R [closed]
|
You can use the cosine function from the lsa package:
http://cran.r-project.org/web/packages/lsa
|
Compute a cosine dissimilarity matrix in R [closed]
|
You can use the cosine function from the lsa package:
http://cran.r-project.org/web/packages/lsa
|
Compute a cosine dissimilarity matrix in R [closed]
You can use the cosine function from the lsa package:
http://cran.r-project.org/web/packages/lsa
|
Compute a cosine dissimilarity matrix in R [closed]
You can use the cosine function from the lsa package:
http://cran.r-project.org/web/packages/lsa
|
9,791
|
Compute a cosine dissimilarity matrix in R [closed]
|
The following function might be useful when working with matrices, instead of 1-d vectors:
# input: row matrices 'ma' and 'mb' (with compatible dimensions)
# output: cosine similarity matrix
cos.sim=function(ma, mb){
mat=tcrossprod(ma, mb)
t1=sqrt(apply(ma, 1, crossprod))
t2=sqrt(apply(mb, 1, crossprod))
mat / outer(t1,t2)
}
|
Compute a cosine dissimilarity matrix in R [closed]
|
The following function might be useful when working with matrices, instead of 1-d vectors:
# input: row matrices 'ma' and 'mb' (with compatible dimensions)
# output: cosine similarity matrix
cos.sim=
|
Compute a cosine dissimilarity matrix in R [closed]
The following function might be useful when working with matrices, instead of 1-d vectors:
# input: row matrices 'ma' and 'mb' (with compatible dimensions)
# output: cosine similarity matrix
cos.sim=function(ma, mb){
mat=tcrossprod(ma, mb)
t1=sqrt(apply(ma, 1, crossprod))
t2=sqrt(apply(mb, 1, crossprod))
mat / outer(t1,t2)
}
|
Compute a cosine dissimilarity matrix in R [closed]
The following function might be useful when working with matrices, instead of 1-d vectors:
# input: row matrices 'ma' and 'mb' (with compatible dimensions)
# output: cosine similarity matrix
cos.sim=
|
9,792
|
Compute a cosine dissimilarity matrix in R [closed]
|
Ramping up some of the previous code (from @Macro) on this issue, we can wrap this into a cleaner version in the following:
df <- data.frame(t(data.frame(c1=rnorm(100),
c2=rnorm(100),
c3=rnorm(100),
c4=rnorm(100),
c5=rnorm(100),
c6=rnorm(100))))
#df[df > 0] <- 1
#df[df <= 0] <- 0
apply_cosine_similarity <- function(df){
cos.sim <- function(df, ix)
{
A = df[ix[1],]
B = df[ix[2],]
return( sum(A*B)/sqrt(sum(A^2)*sum(B^2)) )
}
n <- nrow(df)
cmb <- expand.grid(i=1:n, j=1:n)
C <- matrix(apply(cmb,1,function(cmb){ cos.sim(df, cmb) }),n,n)
C
}
apply_cosine_similarity(df)
Hope this helps!
|
Compute a cosine dissimilarity matrix in R [closed]
|
Ramping up some of the previous code (from @Macro) on this issue, we can wrap this into a cleaner version in the following:
df <- data.frame(t(data.frame(c1=rnorm(100),
c
|
Compute a cosine dissimilarity matrix in R [closed]
Ramping up some of the previous code (from @Macro) on this issue, we can wrap this into a cleaner version in the following:
df <- data.frame(t(data.frame(c1=rnorm(100),
c2=rnorm(100),
c3=rnorm(100),
c4=rnorm(100),
c5=rnorm(100),
c6=rnorm(100))))
#df[df > 0] <- 1
#df[df <= 0] <- 0
apply_cosine_similarity <- function(df){
cos.sim <- function(df, ix)
{
A = df[ix[1],]
B = df[ix[2],]
return( sum(A*B)/sqrt(sum(A^2)*sum(B^2)) )
}
n <- nrow(df)
cmb <- expand.grid(i=1:n, j=1:n)
C <- matrix(apply(cmb,1,function(cmb){ cos.sim(df, cmb) }),n,n)
C
}
apply_cosine_similarity(df)
Hope this helps!
|
Compute a cosine dissimilarity matrix in R [closed]
Ramping up some of the previous code (from @Macro) on this issue, we can wrap this into a cleaner version in the following:
df <- data.frame(t(data.frame(c1=rnorm(100),
c
|
9,793
|
Do error bars on probabilities have any meaning?
|
It wouldn't make sense if you were talking about known probabilities, e.g. with fair coin the probability of throwing heads is 0.5 by definition. However, unless you are talking about textbook example, the exact probability is never known, we only know it approximately.
The different story is when you estimate the probabilities from the data, e.g. you observed 13 winning tickets among the 12563 tickets you bought, so from this data you estimate the probability to be 13/12563. This is something you estimated from the sample, so it is uncertain, because with different sample you could observe different value. The uncertainty estimate is not about the probability, but around the estimate of it.
Another example would be when the probability is not fixed, but depends on other factors. Say that we are talking about probability of dying in car accident. We can consider "global" probability, single value that is marginalized over all the factors that directly and indirectly lead to car accidents. On another hand, you can consider how the probabilities vary among the population given the risk factors.
You can find many more examples where probabilities themselves are considered as random variables, so they vary rather then being fixed.
|
Do error bars on probabilities have any meaning?
|
It wouldn't make sense if you were talking about known probabilities, e.g. with fair coin the probability of throwing heads is 0.5 by definition. However, unless you are talking about textbook example
|
Do error bars on probabilities have any meaning?
It wouldn't make sense if you were talking about known probabilities, e.g. with fair coin the probability of throwing heads is 0.5 by definition. However, unless you are talking about textbook example, the exact probability is never known, we only know it approximately.
The different story is when you estimate the probabilities from the data, e.g. you observed 13 winning tickets among the 12563 tickets you bought, so from this data you estimate the probability to be 13/12563. This is something you estimated from the sample, so it is uncertain, because with different sample you could observe different value. The uncertainty estimate is not about the probability, but around the estimate of it.
Another example would be when the probability is not fixed, but depends on other factors. Say that we are talking about probability of dying in car accident. We can consider "global" probability, single value that is marginalized over all the factors that directly and indirectly lead to car accidents. On another hand, you can consider how the probabilities vary among the population given the risk factors.
You can find many more examples where probabilities themselves are considered as random variables, so they vary rather then being fixed.
|
Do error bars on probabilities have any meaning?
It wouldn't make sense if you were talking about known probabilities, e.g. with fair coin the probability of throwing heads is 0.5 by definition. However, unless you are talking about textbook example
|
9,794
|
Do error bars on probabilities have any meaning?
|
A most relevant illustration from xkcd:
with associated caption:
...an effect size of 1.68 (95% CI: 1.56 (95% CI: 1.52 (95% CI: 1.504
(95% CI: 1.494 (95% CI: 1.488 (95% CI: 1.485 (95% CI: 1.482 (95% CI:
1.481 (95% CI: 1.4799 (95% CI: 1.4791 (95% CI: 1.4784...
|
Do error bars on probabilities have any meaning?
|
A most relevant illustration from xkcd:
with associated caption:
...an effect size of 1.68 (95% CI: 1.56 (95% CI: 1.52 (95% CI: 1.504
(95% CI: 1.494 (95% CI: 1.488 (95% CI: 1.485 (95% CI: 1.482 (9
|
Do error bars on probabilities have any meaning?
A most relevant illustration from xkcd:
with associated caption:
...an effect size of 1.68 (95% CI: 1.56 (95% CI: 1.52 (95% CI: 1.504
(95% CI: 1.494 (95% CI: 1.488 (95% CI: 1.485 (95% CI: 1.482 (95% CI:
1.481 (95% CI: 1.4799 (95% CI: 1.4791 (95% CI: 1.4784...
|
Do error bars on probabilities have any meaning?
A most relevant illustration from xkcd:
with associated caption:
...an effect size of 1.68 (95% CI: 1.56 (95% CI: 1.52 (95% CI: 1.504
(95% CI: 1.494 (95% CI: 1.488 (95% CI: 1.485 (95% CI: 1.482 (9
|
9,795
|
Do error bars on probabilities have any meaning?
|
I know of two interpretations. The first was said by Tim: We have observed $X$ successes out of $Y$ trials, so if we believe the trials were i.i.d. we can estimate the probability of the process at $X/Y$ with some error bars, e.g. of order $1/\sqrt{Y}$.
The second involves "higher-order probabilities" or uncertainties about a generating process. For example, say I have a coin in my hand manufactured by a crafter gambler, who with $0.5$ probability made a 60%-heads coin, and with $0.5$ probability made a 40%-heads coin. My best guess is a 50% chance that the coin comes up heads, but with big error bars: the "true" chance is either 40% or 60%.
In other words, you can imagine running the experiment a billion times and taking the fraction of successes $X/Y$ (actually the limiting fraction). It makes sense, at least from a Bayesian perspective, to give e.g. a 95% confidence interval around that number. In the above example, given current knowledge, this is $[0.4,0.6]$. For a real coin, maybe it is $[0.47,0.53]$ or something. For more, see:
Do We Need Higher-Order Probabilities and, If So, What Do They Mean?
Judea Pearl. UAI 1987. https://arxiv.org/abs/1304.2716
|
Do error bars on probabilities have any meaning?
|
I know of two interpretations. The first was said by Tim: We have observed $X$ successes out of $Y$ trials, so if we believe the trials were i.i.d. we can estimate the probability of the process at $X
|
Do error bars on probabilities have any meaning?
I know of two interpretations. The first was said by Tim: We have observed $X$ successes out of $Y$ trials, so if we believe the trials were i.i.d. we can estimate the probability of the process at $X/Y$ with some error bars, e.g. of order $1/\sqrt{Y}$.
The second involves "higher-order probabilities" or uncertainties about a generating process. For example, say I have a coin in my hand manufactured by a crafter gambler, who with $0.5$ probability made a 60%-heads coin, and with $0.5$ probability made a 40%-heads coin. My best guess is a 50% chance that the coin comes up heads, but with big error bars: the "true" chance is either 40% or 60%.
In other words, you can imagine running the experiment a billion times and taking the fraction of successes $X/Y$ (actually the limiting fraction). It makes sense, at least from a Bayesian perspective, to give e.g. a 95% confidence interval around that number. In the above example, given current knowledge, this is $[0.4,0.6]$. For a real coin, maybe it is $[0.47,0.53]$ or something. For more, see:
Do We Need Higher-Order Probabilities and, If So, What Do They Mean?
Judea Pearl. UAI 1987. https://arxiv.org/abs/1304.2716
|
Do error bars on probabilities have any meaning?
I know of two interpretations. The first was said by Tim: We have observed $X$ successes out of $Y$ trials, so if we believe the trials were i.i.d. we can estimate the probability of the process at $X
|
9,796
|
Do error bars on probabilities have any meaning?
|
All measurements are uncertain.
Therefore, any measurement of probability is also uncertain.
This uncertainty on the measurement of probability can be visually represented with an uncertainty bar. Note that uncertainty bars are often referred to as error bars. This is incorrect or at least misleading, because it shows uncertainty and not error (the error is the difference between the measurement and the unknown truth, so the error is unknown; the uncertainty is a measure of the width of the probability density after taking the measurement).
A related topic is meta-uncertainty. Uncertainty describes the width of an a posteriori probability distribution function, and in case of a Type A uncertainty (uncertainty estimated by repeated measurements), there is inevitable an uncertainty on the uncertainty; metrologists have told me that metrological practice dictates to expand the uncertainty in this case (IIRC, if uncertainty is estimated by the standard deviation of N repeated measurements, one should multiply the resulting standard deviation by $\frac{N}{N-2}$), which is essentially a meta-uncertainty.
|
Do error bars on probabilities have any meaning?
|
All measurements are uncertain.
Therefore, any measurement of probability is also uncertain.
This uncertainty on the measurement of probability can be visually represented with an uncertainty bar. No
|
Do error bars on probabilities have any meaning?
All measurements are uncertain.
Therefore, any measurement of probability is also uncertain.
This uncertainty on the measurement of probability can be visually represented with an uncertainty bar. Note that uncertainty bars are often referred to as error bars. This is incorrect or at least misleading, because it shows uncertainty and not error (the error is the difference between the measurement and the unknown truth, so the error is unknown; the uncertainty is a measure of the width of the probability density after taking the measurement).
A related topic is meta-uncertainty. Uncertainty describes the width of an a posteriori probability distribution function, and in case of a Type A uncertainty (uncertainty estimated by repeated measurements), there is inevitable an uncertainty on the uncertainty; metrologists have told me that metrological practice dictates to expand the uncertainty in this case (IIRC, if uncertainty is estimated by the standard deviation of N repeated measurements, one should multiply the resulting standard deviation by $\frac{N}{N-2}$), which is essentially a meta-uncertainty.
|
Do error bars on probabilities have any meaning?
All measurements are uncertain.
Therefore, any measurement of probability is also uncertain.
This uncertainty on the measurement of probability can be visually represented with an uncertainty bar. No
|
9,797
|
Do error bars on probabilities have any meaning?
|
How could an error bar on a probability arise? Suppose we can assign $\mathrm{prob}(\mathcal{A} | \Theta = \theta, \mathcal{I})$. If $\mathcal{I}$ implies $\Theta = \theta_0$, then $\mathrm{prob}(\Theta = \theta | \mathcal{I}) = \delta_{\theta \theta_0}$ and
\begin{align}
\mathrm{prob}(\mathcal{A} | \mathcal{I}) &= \sum_\theta \mathrm{prob}(\mathcal{A} | \Theta = \theta, \mathcal{I}) \: \delta_{\theta \theta_0} \\
&= \mathrm{prob}(\mathcal{A} | \Theta = \theta_0, \mathcal{I})
\end{align}
Now if $\Theta$ cannot be deduced from $\mathcal{I}$, then it's tempting to think that the uncertainty in $\mathrm{prob}(\Theta = \theta | \mathcal{I})$ must lead to uncertainty in $\mathrm{prob}(\mathcal{A} | \mathcal{I})$. But it doesn't. It merely implies a joint probability for $\mathcal{A}$ and $\Theta = \theta$, which, when $\Theta$ is marginalised, gives a definitive probability for $\mathcal{A}$:
\begin{align}
\mathrm{prob}(\mathcal{A}, \Theta = \theta | \mathcal{I}) &= \mathrm{prob}(\mathcal{A} | \Theta = \theta, \mathcal{I}) \: \mathrm{prob}(\Theta = \theta | \mathcal{I}) \\
\mathrm{prob}(\mathcal{A} | \mathcal{I}) &= \sum_\theta \mathrm{prob}(\mathcal{A} | \Theta = \theta, \mathcal{I}) \: \mathrm{prob}(\Theta = \theta | \mathcal{I})
\end{align}
Thus, adding error bars to a probability is akin to adding uncertainty to nuisance parameters, which can modify the probability, but cannot make it uncertain.
|
Do error bars on probabilities have any meaning?
|
How could an error bar on a probability arise? Suppose we can assign $\mathrm{prob}(\mathcal{A} | \Theta = \theta, \mathcal{I})$. If $\mathcal{I}$ implies $\Theta = \theta_0$, then $\mathrm{prob}(\The
|
Do error bars on probabilities have any meaning?
How could an error bar on a probability arise? Suppose we can assign $\mathrm{prob}(\mathcal{A} | \Theta = \theta, \mathcal{I})$. If $\mathcal{I}$ implies $\Theta = \theta_0$, then $\mathrm{prob}(\Theta = \theta | \mathcal{I}) = \delta_{\theta \theta_0}$ and
\begin{align}
\mathrm{prob}(\mathcal{A} | \mathcal{I}) &= \sum_\theta \mathrm{prob}(\mathcal{A} | \Theta = \theta, \mathcal{I}) \: \delta_{\theta \theta_0} \\
&= \mathrm{prob}(\mathcal{A} | \Theta = \theta_0, \mathcal{I})
\end{align}
Now if $\Theta$ cannot be deduced from $\mathcal{I}$, then it's tempting to think that the uncertainty in $\mathrm{prob}(\Theta = \theta | \mathcal{I})$ must lead to uncertainty in $\mathrm{prob}(\mathcal{A} | \mathcal{I})$. But it doesn't. It merely implies a joint probability for $\mathcal{A}$ and $\Theta = \theta$, which, when $\Theta$ is marginalised, gives a definitive probability for $\mathcal{A}$:
\begin{align}
\mathrm{prob}(\mathcal{A}, \Theta = \theta | \mathcal{I}) &= \mathrm{prob}(\mathcal{A} | \Theta = \theta, \mathcal{I}) \: \mathrm{prob}(\Theta = \theta | \mathcal{I}) \\
\mathrm{prob}(\mathcal{A} | \mathcal{I}) &= \sum_\theta \mathrm{prob}(\mathcal{A} | \Theta = \theta, \mathcal{I}) \: \mathrm{prob}(\Theta = \theta | \mathcal{I})
\end{align}
Thus, adding error bars to a probability is akin to adding uncertainty to nuisance parameters, which can modify the probability, but cannot make it uncertain.
|
Do error bars on probabilities have any meaning?
How could an error bar on a probability arise? Suppose we can assign $\mathrm{prob}(\mathcal{A} | \Theta = \theta, \mathcal{I})$. If $\mathcal{I}$ implies $\Theta = \theta_0$, then $\mathrm{prob}(\The
|
9,798
|
Do error bars on probabilities have any meaning?
|
There are very often occasions where you want to have a probability of a probability. Say for instance you worked in food safety and used a survival analysis model to estimate the probability that botulinum spores would germinate (and thus produce the deadly toxin) as a function of the food preparation steps (i.e. cooking) and incubation time/temperature (c.f. paper). Food producers may then want to use that model to set safe "use-by" dates so that consumer's risk of botulism is appropriately small. However, the model is fit to a finite training sample, so rather than picking a use-by date for which the probability of germination is less than, say 0.001, you might want to choose an earlier date for which (given the modelling assumptions) you could be 95% sure the probability of germination is less than 0.001. This seems a fairly natural thing to do in a Bayesian setting.
|
Do error bars on probabilities have any meaning?
|
There are very often occasions where you want to have a probability of a probability. Say for instance you worked in food safety and used a survival analysis model to estimate the probability that bo
|
Do error bars on probabilities have any meaning?
There are very often occasions where you want to have a probability of a probability. Say for instance you worked in food safety and used a survival analysis model to estimate the probability that botulinum spores would germinate (and thus produce the deadly toxin) as a function of the food preparation steps (i.e. cooking) and incubation time/temperature (c.f. paper). Food producers may then want to use that model to set safe "use-by" dates so that consumer's risk of botulism is appropriately small. However, the model is fit to a finite training sample, so rather than picking a use-by date for which the probability of germination is less than, say 0.001, you might want to choose an earlier date for which (given the modelling assumptions) you could be 95% sure the probability of germination is less than 0.001. This seems a fairly natural thing to do in a Bayesian setting.
|
Do error bars on probabilities have any meaning?
There are very often occasions where you want to have a probability of a probability. Say for instance you worked in food safety and used a survival analysis model to estimate the probability that bo
|
9,799
|
Do error bars on probabilities have any meaning?
|
tl;dr- Any one-off guess from a particular guesser can be reduced to a single probability. However, that's just the trivial case; probability structures can make sense whenever there's some contextual relevance beyond just a single probability.
The chance of a random coin landing on Heads is 50%.
Doesn't matter if it's a fair coin or not; at least, not to me. Because while the coin may have bias that a knowledgeable observer could use to make more informed predictions, I'd have to guess 50% odds.
My probability table is:
$$
\begin{array}{c|c}
\textbf{Heads} & \textbf{Tails} \\ \hline
50 \% & 50 \%
\end{array}_{.}
$$
But what if I tell someone that the coin has 50% odds, and then they have to make a decision about what happens on two coin flips? Lacking further information, they'd have to default to guessing that coin flips are independent events, arriving at:
$$
{\newcommand{\rotate}[2]{{\style{transform-origin: center middle; display: inline-block; transform: rotate(#1deg); padding: 25px}{\rlap{#2}}}}}
\hspace{-165px}
\begin{array}{rc}
& \qquad \qquad \small{\text{First flip}} \\
\rotate{-90}{\hspace{-25px}\small{\begin{array}{c}\text{Second} \\ \text{flip} \end{array}}} &
\begin{array}{r|c|c}
& \textbf{Heads} & \textbf{Tails} \\ \hline
\textbf{Heads} & 25 \% & 25 \% \\ \hline
\textbf{Tails} & 25 \% & 25 \%
\end{array}_{,}
\end{array}
$$
from which they might conclude
$$
\begin{array}{c|c}
\begin{array}{c}\textbf{Same side} \\[-5px] \textbf{twice}\end{array} & \begin{array}{c}\textbf{Heads} \\[-5px] \textbf{and Tails} \end{array} \\ \hline
50 \% & 50 \%
\end{array}_{.}
$$
However, the coin flips aren't independent events; they're connected by a common causal agent, describable as the coin's bias.
If we assume a model in which a coin has a constant probability of Heads, $P_{\small{\text{Heads}}} ,$ then it might be more precise to say
$$
\begin{array}{c|c}
\textbf{Heads} & \textbf{Tails} \\ \hline
P_{\small{\text{Heads}}} & 1 - P_{\small{\text{Heads}}}
\end{array}_{.}
$$
From this, someone might think
$$
{\newcommand{\rotate}[2]{{\style{transform-origin: center middle; display: inline-block; transform: rotate(#1deg); padding: 25px}{\rlap{#2}}}}}
\hspace{-165px}
\begin{array}{rc}
& \qquad \qquad \small{\text{First flip}} \\
\rotate{-90}{\hspace{-25px}\small{\begin{array}{c}\text{Second} \\ \text{flip} \end{array}}} &
\begin{array}{r|c|c}
& \textbf{Heads} & \textbf{Tails} \\ \hline
\textbf{Heads} & P_{\small{\text{Heads}}}^{2} & P_{\small{\text{Heads}}} \left(1-P_{\small{\text{Heads}}}\right) \\ \hline
\textbf{Tails} & P_{\small{\text{Heads}}} \left(1-P_{\small{\text{Heads}}}\right) & {\left(1-P_{\small{\text{Heads}}}\right)}^{2}
\end{array}_{,}
\end{array}
$$
from which they might conclude
$$
\begin{array}{c|c}
\begin{array}{c}\textbf{Same side} \\[-5px] \textbf{twice}\end{array} & \begin{array}{c}\textbf{Heads} \\[-5px] \textbf{and Tails} \end{array} \\ \hline
1 - 2 P_{\small{\text{Heads}}} \left(1 - P_{\small{\text{Heads}}} \right) & 2 P_{\small{\text{Heads}}} \left(1 - P_{\small{\text{Heads}}} \right)
\end{array}_{.}
$$
If I had to guess $P_{\small{\text{Heads}}} ,$ then I'd still go with $50 \% ,$ so it'd seem like this would reduce to the prior tables.
So it's the same thing, right?
Turns out that the odds of getting two-Heads-or-Tails is always greater than getting one-of-each, except in the special case of a perfectly fair coin. So if you do reduce the table, assuming that the probability itself captures the uncertainty, your predictions would be absurd when extended.
That said, there's no "true" coin flip. We could have all sorts of different flipping methodologies that could yield very different results and apparent biases. So, the idea that there's a consistent value of $P_{\small{\text{Heads}}}$ would also tend to lead to errors when we construct arguments based on that premise.
So if someone asks me the odds of a coin flip, I wouldn't say $`` 50 \% " ,$ despite it being my best guess. Instead, I'd probably say $`` \text{probably about}~50\% " .$
And what I'd be trying to say is roughly:
If I had to make a one-off guess, I'd probably go with about $50 \% .$ However, there's further context that you should probably ask me to clarify if it's important.
People often say some event has a 50-60% chance of happening.
If you sat down with them and worked out all of their data, models, etc., you might be able to generate a better number, or, ideally, a better model that'd more robustly capture their predictive ability.
But if you split the difference and just call it 55%, that'd be like assuming $P_{\small{\text{Heads}}} = 50 \%$ in that you'd basically be running with a quick estimate after having truncated the higher-order aspects of it. Not necessarily a bad tactic for a one-off quick estimate, but it does lose something.
|
Do error bars on probabilities have any meaning?
|
tl;dr- Any one-off guess from a particular guesser can be reduced to a single probability. However, that's just the trivial case; probability structures can make sense whenever there's some contextu
|
Do error bars on probabilities have any meaning?
tl;dr- Any one-off guess from a particular guesser can be reduced to a single probability. However, that's just the trivial case; probability structures can make sense whenever there's some contextual relevance beyond just a single probability.
The chance of a random coin landing on Heads is 50%.
Doesn't matter if it's a fair coin or not; at least, not to me. Because while the coin may have bias that a knowledgeable observer could use to make more informed predictions, I'd have to guess 50% odds.
My probability table is:
$$
\begin{array}{c|c}
\textbf{Heads} & \textbf{Tails} \\ \hline
50 \% & 50 \%
\end{array}_{.}
$$
But what if I tell someone that the coin has 50% odds, and then they have to make a decision about what happens on two coin flips? Lacking further information, they'd have to default to guessing that coin flips are independent events, arriving at:
$$
{\newcommand{\rotate}[2]{{\style{transform-origin: center middle; display: inline-block; transform: rotate(#1deg); padding: 25px}{\rlap{#2}}}}}
\hspace{-165px}
\begin{array}{rc}
& \qquad \qquad \small{\text{First flip}} \\
\rotate{-90}{\hspace{-25px}\small{\begin{array}{c}\text{Second} \\ \text{flip} \end{array}}} &
\begin{array}{r|c|c}
& \textbf{Heads} & \textbf{Tails} \\ \hline
\textbf{Heads} & 25 \% & 25 \% \\ \hline
\textbf{Tails} & 25 \% & 25 \%
\end{array}_{,}
\end{array}
$$
from which they might conclude
$$
\begin{array}{c|c}
\begin{array}{c}\textbf{Same side} \\[-5px] \textbf{twice}\end{array} & \begin{array}{c}\textbf{Heads} \\[-5px] \textbf{and Tails} \end{array} \\ \hline
50 \% & 50 \%
\end{array}_{.}
$$
However, the coin flips aren't independent events; they're connected by a common causal agent, describable as the coin's bias.
If we assume a model in which a coin has a constant probability of Heads, $P_{\small{\text{Heads}}} ,$ then it might be more precise to say
$$
\begin{array}{c|c}
\textbf{Heads} & \textbf{Tails} \\ \hline
P_{\small{\text{Heads}}} & 1 - P_{\small{\text{Heads}}}
\end{array}_{.}
$$
From this, someone might think
$$
{\newcommand{\rotate}[2]{{\style{transform-origin: center middle; display: inline-block; transform: rotate(#1deg); padding: 25px}{\rlap{#2}}}}}
\hspace{-165px}
\begin{array}{rc}
& \qquad \qquad \small{\text{First flip}} \\
\rotate{-90}{\hspace{-25px}\small{\begin{array}{c}\text{Second} \\ \text{flip} \end{array}}} &
\begin{array}{r|c|c}
& \textbf{Heads} & \textbf{Tails} \\ \hline
\textbf{Heads} & P_{\small{\text{Heads}}}^{2} & P_{\small{\text{Heads}}} \left(1-P_{\small{\text{Heads}}}\right) \\ \hline
\textbf{Tails} & P_{\small{\text{Heads}}} \left(1-P_{\small{\text{Heads}}}\right) & {\left(1-P_{\small{\text{Heads}}}\right)}^{2}
\end{array}_{,}
\end{array}
$$
from which they might conclude
$$
\begin{array}{c|c}
\begin{array}{c}\textbf{Same side} \\[-5px] \textbf{twice}\end{array} & \begin{array}{c}\textbf{Heads} \\[-5px] \textbf{and Tails} \end{array} \\ \hline
1 - 2 P_{\small{\text{Heads}}} \left(1 - P_{\small{\text{Heads}}} \right) & 2 P_{\small{\text{Heads}}} \left(1 - P_{\small{\text{Heads}}} \right)
\end{array}_{.}
$$
If I had to guess $P_{\small{\text{Heads}}} ,$ then I'd still go with $50 \% ,$ so it'd seem like this would reduce to the prior tables.
So it's the same thing, right?
Turns out that the odds of getting two-Heads-or-Tails is always greater than getting one-of-each, except in the special case of a perfectly fair coin. So if you do reduce the table, assuming that the probability itself captures the uncertainty, your predictions would be absurd when extended.
That said, there's no "true" coin flip. We could have all sorts of different flipping methodologies that could yield very different results and apparent biases. So, the idea that there's a consistent value of $P_{\small{\text{Heads}}}$ would also tend to lead to errors when we construct arguments based on that premise.
So if someone asks me the odds of a coin flip, I wouldn't say $`` 50 \% " ,$ despite it being my best guess. Instead, I'd probably say $`` \text{probably about}~50\% " .$
And what I'd be trying to say is roughly:
If I had to make a one-off guess, I'd probably go with about $50 \% .$ However, there's further context that you should probably ask me to clarify if it's important.
People often say some event has a 50-60% chance of happening.
If you sat down with them and worked out all of their data, models, etc., you might be able to generate a better number, or, ideally, a better model that'd more robustly capture their predictive ability.
But if you split the difference and just call it 55%, that'd be like assuming $P_{\small{\text{Heads}}} = 50 \%$ in that you'd basically be running with a quick estimate after having truncated the higher-order aspects of it. Not necessarily a bad tactic for a one-off quick estimate, but it does lose something.
|
Do error bars on probabilities have any meaning?
tl;dr- Any one-off guess from a particular guesser can be reduced to a single probability. However, that's just the trivial case; probability structures can make sense whenever there's some contextu
|
9,800
|
Do error bars on probabilities have any meaning?
|
I would argue that only the error bars matter, but in the given example, the whole thing is probably almost meaningless.
The example lends itself to interpretaton as a confidence interval, in which the upper and lower bounds of some degree of certainty are the range of probability. This proposed answer will deal with that interpretation. Majority source -- https://www.amazon.com/How-Measure-Anything-Intangibles-Business-ebook/dp/B00INUYS2U
The example says that to a given level of confidence, the answer is unlikely to be above 60% and equally unlikely to be below 50%. This is so convenient a set of numbers that it resembles "binning", in which a swag of 55% is further swagged to a +/- 5% range. Familiarly round numbers are immediately suspect.
One way to arrive at a confidence interval is to decide upon a chosen level of confidence -- let's say 90% -- and we allow that the thing could be either lower or higher than our estimate, but that there is only a 10% chance the "correct" answer lies outside of our interval. So we estimate a higher bound such that "there is only a 1/20 chance of the proper answer being greater than this upper bound", and do similar for the lower bound. This can be done through "calibrated estimation", which is one form of measurement, or though other forms of measurement.
Regardless, the point is to A) admit from the beginning that there is an uncertainty associated with our uncertainty, and B) avoid throwing up our hands at the thing, calling it a mess, and simply tacking on 5% above and below. The benefit is that an approach rigorous to a chosen degree can yield results which are still mathematically relevant, to a degree which can be stated mathematically: "There is a 90% chance that the correct answer lies between these two bounds..." This is a properly formed confidence interval (CI), anmd it can be used in further calculations.
What's more, by assiging it a confidence, we can calibrate the method used to arrive at the estimate, by comparing predictions vs results and acting on what we find to improve the estimation method. Nothing can be made perfect, but many things can be made 90% effective.
Note that the 90% CI has nothing to do with the fact that the example given in the OP contains 10% of the field and omits 90%.
What is the wingspan of a Boeing 747-100, to a 90% CI? Well, I'm 95% sure that it is not more than 300 ft, and I am equally sure that it is not less than 200 ft. So off the top of my head, I'll give you a 90% CI of 200-235 feet.
NOTE that there is no "central" estimate. CIs are not formed by guesses plus fudge factors. This is why I say that the error bars probably matter more than a given estimate.
That said, an interval estimate (everything above) is not necessarily better than a point estimate with a properly calulated error (which is beyond my recall at this point -- I recall only that it's frequently done incorrectly). I am just saying that many estimates expressed as ranges -- and I'll hazard that most ranges with round numbers -- are point+fudge rather than either interval or point+error estimates.
One proper use of point+error:
"A machine fills cups with a liquid, and is supposed to be adjusted so
that the content of the cups is 250 g of liquid. As the machine cannot
fill every cup with exactly 250.0 g, the content added to individual
cups shows some variation, and is considered a random variable X. This
variation is assumed to be normally distributed around the desired
average of 250 g, with a standard deviation, σ, of 2.5 g. To determine
if the machine is adequately calibrated, a sample of n = 25 cups of
liquid is chosen at random and the cups are weighed. The resulting
measured masses of liquid are X1, ..., X25, a random sample from X."
Key point: in this example, both the mean and the error are specified/assumed, rather than estimated/measured.
|
Do error bars on probabilities have any meaning?
|
I would argue that only the error bars matter, but in the given example, the whole thing is probably almost meaningless.
The example lends itself to interpretaton as a confidence interval, in which th
|
Do error bars on probabilities have any meaning?
I would argue that only the error bars matter, but in the given example, the whole thing is probably almost meaningless.
The example lends itself to interpretaton as a confidence interval, in which the upper and lower bounds of some degree of certainty are the range of probability. This proposed answer will deal with that interpretation. Majority source -- https://www.amazon.com/How-Measure-Anything-Intangibles-Business-ebook/dp/B00INUYS2U
The example says that to a given level of confidence, the answer is unlikely to be above 60% and equally unlikely to be below 50%. This is so convenient a set of numbers that it resembles "binning", in which a swag of 55% is further swagged to a +/- 5% range. Familiarly round numbers are immediately suspect.
One way to arrive at a confidence interval is to decide upon a chosen level of confidence -- let's say 90% -- and we allow that the thing could be either lower or higher than our estimate, but that there is only a 10% chance the "correct" answer lies outside of our interval. So we estimate a higher bound such that "there is only a 1/20 chance of the proper answer being greater than this upper bound", and do similar for the lower bound. This can be done through "calibrated estimation", which is one form of measurement, or though other forms of measurement.
Regardless, the point is to A) admit from the beginning that there is an uncertainty associated with our uncertainty, and B) avoid throwing up our hands at the thing, calling it a mess, and simply tacking on 5% above and below. The benefit is that an approach rigorous to a chosen degree can yield results which are still mathematically relevant, to a degree which can be stated mathematically: "There is a 90% chance that the correct answer lies between these two bounds..." This is a properly formed confidence interval (CI), anmd it can be used in further calculations.
What's more, by assiging it a confidence, we can calibrate the method used to arrive at the estimate, by comparing predictions vs results and acting on what we find to improve the estimation method. Nothing can be made perfect, but many things can be made 90% effective.
Note that the 90% CI has nothing to do with the fact that the example given in the OP contains 10% of the field and omits 90%.
What is the wingspan of a Boeing 747-100, to a 90% CI? Well, I'm 95% sure that it is not more than 300 ft, and I am equally sure that it is not less than 200 ft. So off the top of my head, I'll give you a 90% CI of 200-235 feet.
NOTE that there is no "central" estimate. CIs are not formed by guesses plus fudge factors. This is why I say that the error bars probably matter more than a given estimate.
That said, an interval estimate (everything above) is not necessarily better than a point estimate with a properly calulated error (which is beyond my recall at this point -- I recall only that it's frequently done incorrectly). I am just saying that many estimates expressed as ranges -- and I'll hazard that most ranges with round numbers -- are point+fudge rather than either interval or point+error estimates.
One proper use of point+error:
"A machine fills cups with a liquid, and is supposed to be adjusted so
that the content of the cups is 250 g of liquid. As the machine cannot
fill every cup with exactly 250.0 g, the content added to individual
cups shows some variation, and is considered a random variable X. This
variation is assumed to be normally distributed around the desired
average of 250 g, with a standard deviation, σ, of 2.5 g. To determine
if the machine is adequately calibrated, a sample of n = 25 cups of
liquid is chosen at random and the cups are weighed. The resulting
measured masses of liquid are X1, ..., X25, a random sample from X."
Key point: in this example, both the mean and the error are specified/assumed, rather than estimated/measured.
|
Do error bars on probabilities have any meaning?
I would argue that only the error bars matter, but in the given example, the whole thing is probably almost meaningless.
The example lends itself to interpretaton as a confidence interval, in which th
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.