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
|
|---|---|---|---|---|---|---|
43,701
|
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
|
43,702
|
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
|
43,703
|
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
|
43,704
|
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!
|
43,705
|
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.
|
43,706
|
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
|
43,707
|
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
|
43,708
|
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.
|
43,709
|
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
|
43,710
|
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.
|
43,711
|
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
|
43,712
|
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).
|
43,713
|
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
|
43,714
|
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.
|
43,715
|
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
|
43,716
|
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
|
43,717
|
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
|
43,718
|
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.
|
43,719
|
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
|
43,720
|
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.
|
43,721
|
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
|
43,722
|
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.
|
43,723
|
Testing random variate generation algorithms
|
The Diehard Test Suite is something close to a Golden Standard for testing random number generators. It includes a number of tests where a good random number generator should produce result distributed according to some know distribution against which the outcome using the tested generator can then be compared.
EDIT
I have to update this since I was not exactly right:
Diehard might still be used a lot, but it is no longer maintained and not state-of-the-art anymore. NIST has come up with a set of improved tests since.
|
Testing random variate generation algorithms
|
The Diehard Test Suite is something close to a Golden Standard for testing random number generators. It includes a number of tests where a good random number generator should produce result distribute
|
Testing random variate generation algorithms
The Diehard Test Suite is something close to a Golden Standard for testing random number generators. It includes a number of tests where a good random number generator should produce result distributed according to some know distribution against which the outcome using the tested generator can then be compared.
EDIT
I have to update this since I was not exactly right:
Diehard might still be used a lot, but it is no longer maintained and not state-of-the-art anymore. NIST has come up with a set of improved tests since.
|
Testing random variate generation algorithms
The Diehard Test Suite is something close to a Golden Standard for testing random number generators. It includes a number of tests where a good random number generator should produce result distribute
|
43,724
|
Testing random variate generation algorithms
|
Just to add a bit to honk's answer, the Diehard Test Suite (developed by George Marsaglia) are the standard tests for PRNG.
There's a nice Diehard C library that gives you access to these tests. As well as the standard Diehard tests it also provides functions for a few other PRNG tests involving (amongst other things) checking bit order. There is also a facilty for testing the speed of the RNG and writing your own tests.
There is a R interface to the Dieharder library, called RDieHarder:
library(RDieHarder)
dhtest = dieharder(rng="randu", test=10, psamples=100, seed=12345)
print(dhtest)
Diehard Count the 1s Test (byte)
data: Created by RNG `randu' with seed=12345,
sample of size 100 p-value < 2.2e-16
This shows that the RANDU RNG generator fails the minimum-distance / 2dsphere test.
|
Testing random variate generation algorithms
|
Just to add a bit to honk's answer, the Diehard Test Suite (developed by George Marsaglia) are the standard tests for PRNG.
There's a nice Diehard C library that gives you access to these tests. As we
|
Testing random variate generation algorithms
Just to add a bit to honk's answer, the Diehard Test Suite (developed by George Marsaglia) are the standard tests for PRNG.
There's a nice Diehard C library that gives you access to these tests. As well as the standard Diehard tests it also provides functions for a few other PRNG tests involving (amongst other things) checking bit order. There is also a facilty for testing the speed of the RNG and writing your own tests.
There is a R interface to the Dieharder library, called RDieHarder:
library(RDieHarder)
dhtest = dieharder(rng="randu", test=10, psamples=100, seed=12345)
print(dhtest)
Diehard Count the 1s Test (byte)
data: Created by RNG `randu' with seed=12345,
sample of size 100 p-value < 2.2e-16
This shows that the RANDU RNG generator fails the minimum-distance / 2dsphere test.
|
Testing random variate generation algorithms
Just to add a bit to honk's answer, the Diehard Test Suite (developed by George Marsaglia) are the standard tests for PRNG.
There's a nice Diehard C library that gives you access to these tests. As we
|
43,725
|
Testing random variate generation algorithms
|
For testing the numbers produced by random number generators the Diehard tests are a practical approach. But those tests seem kind of arbitrary and one is may be left wondering if more should be included or if there is any way to really check the randomness.
The best candidate for a definition of a random sequence seems to be the Martin-Löf randomness. The main idea for this kind of randomness, is beautifully developed in Knuth, section 3.5, is to test for uniformity for all types of sub-sequences of the sequence of random numbers. Getting that all type of subsequences definition right turned out to be be really hard even when one uses notions of computability.
The Diehard tests are just some of the possible subsequences one may consider and their failure would exclude Martin-Löf randomness.
|
Testing random variate generation algorithms
|
For testing the numbers produced by random number generators the Diehard tests are a practical approach. But those tests seem kind of arbitrary and one is may be left wondering if more should be inclu
|
Testing random variate generation algorithms
For testing the numbers produced by random number generators the Diehard tests are a practical approach. But those tests seem kind of arbitrary and one is may be left wondering if more should be included or if there is any way to really check the randomness.
The best candidate for a definition of a random sequence seems to be the Martin-Löf randomness. The main idea for this kind of randomness, is beautifully developed in Knuth, section 3.5, is to test for uniformity for all types of sub-sequences of the sequence of random numbers. Getting that all type of subsequences definition right turned out to be be really hard even when one uses notions of computability.
The Diehard tests are just some of the possible subsequences one may consider and their failure would exclude Martin-Löf randomness.
|
Testing random variate generation algorithms
For testing the numbers produced by random number generators the Diehard tests are a practical approach. But those tests seem kind of arbitrary and one is may be left wondering if more should be inclu
|
43,726
|
Testing random variate generation algorithms
|
You cannot prove, because it is impossible; you can only check if there are no any embarrassing autocorrelations or distribution disturbances, and indeed Diehard is a standard for it. This is for statistics/physics, cryptographers will also mainly check (among other things) how hard is it to fit the generator to the data to obtain the future values.
|
Testing random variate generation algorithms
|
You cannot prove, because it is impossible; you can only check if there are no any embarrassing autocorrelations or distribution disturbances, and indeed Diehard is a standard for it. This is for stat
|
Testing random variate generation algorithms
You cannot prove, because it is impossible; you can only check if there are no any embarrassing autocorrelations or distribution disturbances, and indeed Diehard is a standard for it. This is for statistics/physics, cryptographers will also mainly check (among other things) how hard is it to fit the generator to the data to obtain the future values.
|
Testing random variate generation algorithms
You cannot prove, because it is impossible; you can only check if there are no any embarrassing autocorrelations or distribution disturbances, and indeed Diehard is a standard for it. This is for stat
|
43,727
|
Testing random variate generation algorithms
|
Small correction to Colin's post: the CRAN package
RDieHarder is an interface to
DieHarder, the Diehard rewrite / extension / overhaul done by Robert G. Brown (who kindly lists me as a coauthor based on my RDieHarder wrappers) with recent contribution by David Bauer.
Among other things, DieHarder includes the NIST battery of tests mentioned in Mark's post as well as some new ones. This is ongoing research and has been for a while. I gave a talk at useR! 2007 about RDieHarder which you can get from here.
|
Testing random variate generation algorithms
|
Small correction to Colin's post: the CRAN package
RDieHarder is an interface to
DieHarder, the Diehard rewrite / extension / overhaul done by Robert G. Brown (who kindly lists me as a coauthor base
|
Testing random variate generation algorithms
Small correction to Colin's post: the CRAN package
RDieHarder is an interface to
DieHarder, the Diehard rewrite / extension / overhaul done by Robert G. Brown (who kindly lists me as a coauthor based on my RDieHarder wrappers) with recent contribution by David Bauer.
Among other things, DieHarder includes the NIST battery of tests mentioned in Mark's post as well as some new ones. This is ongoing research and has been for a while. I gave a talk at useR! 2007 about RDieHarder which you can get from here.
|
Testing random variate generation algorithms
Small correction to Colin's post: the CRAN package
RDieHarder is an interface to
DieHarder, the Diehard rewrite / extension / overhaul done by Robert G. Brown (who kindly lists me as a coauthor base
|
43,728
|
Testing random variate generation algorithms
|
It's seldom useful to conclude that something is "random" in the abstract. More often you want to test whether it has a certain kind of random structure. For example, you might want to test whether something has a uniform distribution, with all values in a certain range equally likely. Or you might want to test whether something has a normal distribution, etc. To test whether data has a particular distribution, you can use a goodness of fit test such as the chi square test or the Kolmogorov-Smirnov test.
|
Testing random variate generation algorithms
|
It's seldom useful to conclude that something is "random" in the abstract. More often you want to test whether it has a certain kind of random structure. For example, you might want to test whether
|
Testing random variate generation algorithms
It's seldom useful to conclude that something is "random" in the abstract. More often you want to test whether it has a certain kind of random structure. For example, you might want to test whether something has a uniform distribution, with all values in a certain range equally likely. Or you might want to test whether something has a normal distribution, etc. To test whether data has a particular distribution, you can use a goodness of fit test such as the chi square test or the Kolmogorov-Smirnov test.
|
Testing random variate generation algorithms
It's seldom useful to conclude that something is "random" in the abstract. More often you want to test whether it has a certain kind of random structure. For example, you might want to test whether
|
43,729
|
Testing random variate generation algorithms
|
There are two parts to testing a random number generator. If you're only concerned with testing a uniform generator, then yes, something like the DIEHARD test suite is a good idea.
But often you need to test a transformation of a uniform generator. For example, you might use a uniform generator to create exponentially or normally distributed values. You may have a high-quality uniform generator -- say you have a trusted implementation of a well-known algorithm such as Mersenne Twister -- but you need to test whether the transformed output has the right distribution. In that case you need to do some sort of goodness of fit test such as Kolmogorov-Smirnov. But for starters, you could verify that the sample mean and variance have the values you expect.
Most people don't -- and shouldn't -- write their own uniform random number generator from scratch. It's hard to write a good generator and easy to fool yourself into thinking you've written a good one when you haven't. For example, Donald Knuth tells the story in TAOCP volume 2 of a random number generator he wrote that turned out to be awful. But it's common for people to have to write their own code to produce random values from a new distribution.
|
Testing random variate generation algorithms
|
There are two parts to testing a random number generator. If you're only concerned with testing a uniform generator, then yes, something like the DIEHARD test suite is a good idea.
But often you need
|
Testing random variate generation algorithms
There are two parts to testing a random number generator. If you're only concerned with testing a uniform generator, then yes, something like the DIEHARD test suite is a good idea.
But often you need to test a transformation of a uniform generator. For example, you might use a uniform generator to create exponentially or normally distributed values. You may have a high-quality uniform generator -- say you have a trusted implementation of a well-known algorithm such as Mersenne Twister -- but you need to test whether the transformed output has the right distribution. In that case you need to do some sort of goodness of fit test such as Kolmogorov-Smirnov. But for starters, you could verify that the sample mean and variance have the values you expect.
Most people don't -- and shouldn't -- write their own uniform random number generator from scratch. It's hard to write a good generator and easy to fool yourself into thinking you've written a good one when you haven't. For example, Donald Knuth tells the story in TAOCP volume 2 of a random number generator he wrote that turned out to be awful. But it's common for people to have to write their own code to produce random values from a new distribution.
|
Testing random variate generation algorithms
There are two parts to testing a random number generator. If you're only concerned with testing a uniform generator, then yes, something like the DIEHARD test suite is a good idea.
But often you need
|
43,730
|
Testing random variate generation algorithms
|
The NIST publishes a list of statistical tests with a reference implementation in C.
There is also TestU01 by some smart folks, including respected PRNG researcher Pierre L'Ecuyer. Again, there is a reference implementation in C.
As pointed out by other commenters, these are for testing the generation of pseudo random bits. If you transform these bits into a different random variable (e.g. Box-Muller transform from uniform to Normal), you'll need additional tests to confirm the correctness of the transform algorithm.
|
Testing random variate generation algorithms
|
The NIST publishes a list of statistical tests with a reference implementation in C.
There is also TestU01 by some smart folks, including respected PRNG researcher Pierre L'Ecuyer. Again, there is a r
|
Testing random variate generation algorithms
The NIST publishes a list of statistical tests with a reference implementation in C.
There is also TestU01 by some smart folks, including respected PRNG researcher Pierre L'Ecuyer. Again, there is a reference implementation in C.
As pointed out by other commenters, these are for testing the generation of pseudo random bits. If you transform these bits into a different random variable (e.g. Box-Muller transform from uniform to Normal), you'll need additional tests to confirm the correctness of the transform algorithm.
|
Testing random variate generation algorithms
The NIST publishes a list of statistical tests with a reference implementation in C.
There is also TestU01 by some smart folks, including respected PRNG researcher Pierre L'Ecuyer. Again, there is a r
|
43,731
|
Should we balance the data set if the data is intrinsically unbalanced? [duplicate]
|
There are some very good answers in this thread.
Does an unbalanced sample matter when doing logistic regression?
Also, your setting is a classic setting where you would have high cost if you say someone does not have cancer, but in they fact they do.
|
Should we balance the data set if the data is intrinsically unbalanced? [duplicate]
|
There are some very good answers in this thread.
Does an unbalanced sample matter when doing logistic regression?
Also, your setting is a classic setting where you would have high cost if you say some
|
Should we balance the data set if the data is intrinsically unbalanced? [duplicate]
There are some very good answers in this thread.
Does an unbalanced sample matter when doing logistic regression?
Also, your setting is a classic setting where you would have high cost if you say someone does not have cancer, but in they fact they do.
|
Should we balance the data set if the data is intrinsically unbalanced? [duplicate]
There are some very good answers in this thread.
Does an unbalanced sample matter when doing logistic regression?
Also, your setting is a classic setting where you would have high cost if you say some
|
43,732
|
Should we balance the data set if the data is intrinsically unbalanced? [duplicate]
|
You should always use a sampling approach in logistic regression. When facing an unbalanced dataset, which means there is a huge size difference between the event (response, positive..) vs non-event (no response, negative...) data. When the target event is rare, a representative sample is unlikely to have enough target events to build a good predictive model. Fortunately, the amount of information in a data set with a categorical outcome (such as a response to a marketing campaign) is determined not by the total number of cases in the data set, but by the number of cases in the rarest outcome category.
Oversampling
One approach is to oversampling. While oversampling reduces analysis time, it also introduces some biases. You need to correct these biases so that the results are applicable to the population.
For example, you might choose a sampling of data that contains all of the events and only a subset of the nonevents, which will make event and non-event data sizes similar. Again, this kind of analysis introduces biases that you need to correct so that the results are applicable to the population.
Splitting the data for training, validation, and test. (You probably know this.)
Bias correction.
The effect of oversampling is the response ($logit(\hat{p})$) surface for a logistic regression model is shifted linearly, and oversampling does not affect the slopes, but it does make the intercepts too high or too low.
To correct the bias, or offset follow the equation
$$Offset = \ln \frac{(\pi_0 \rho_1)}{(\pi_1 \rho_0)}$$
$\pi_0$=proportion of non-events in the population;
$\pi_1$=proportion of events in the population.
$\rho_0$=proportion of non-events in the sample;
$\rho_1$=proportion of events in the sample.
The output results should be ($logit(\hat{p})-$offset)
|
Should we balance the data set if the data is intrinsically unbalanced? [duplicate]
|
You should always use a sampling approach in logistic regression. When facing an unbalanced dataset, which means there is a huge size difference between the event (response, positive..) vs non-event (
|
Should we balance the data set if the data is intrinsically unbalanced? [duplicate]
You should always use a sampling approach in logistic regression. When facing an unbalanced dataset, which means there is a huge size difference between the event (response, positive..) vs non-event (no response, negative...) data. When the target event is rare, a representative sample is unlikely to have enough target events to build a good predictive model. Fortunately, the amount of information in a data set with a categorical outcome (such as a response to a marketing campaign) is determined not by the total number of cases in the data set, but by the number of cases in the rarest outcome category.
Oversampling
One approach is to oversampling. While oversampling reduces analysis time, it also introduces some biases. You need to correct these biases so that the results are applicable to the population.
For example, you might choose a sampling of data that contains all of the events and only a subset of the nonevents, which will make event and non-event data sizes similar. Again, this kind of analysis introduces biases that you need to correct so that the results are applicable to the population.
Splitting the data for training, validation, and test. (You probably know this.)
Bias correction.
The effect of oversampling is the response ($logit(\hat{p})$) surface for a logistic regression model is shifted linearly, and oversampling does not affect the slopes, but it does make the intercepts too high or too low.
To correct the bias, or offset follow the equation
$$Offset = \ln \frac{(\pi_0 \rho_1)}{(\pi_1 \rho_0)}$$
$\pi_0$=proportion of non-events in the population;
$\pi_1$=proportion of events in the population.
$\rho_0$=proportion of non-events in the sample;
$\rho_1$=proportion of events in the sample.
The output results should be ($logit(\hat{p})-$offset)
|
Should we balance the data set if the data is intrinsically unbalanced? [duplicate]
You should always use a sampling approach in logistic regression. When facing an unbalanced dataset, which means there is a huge size difference between the event (response, positive..) vs non-event (
|
43,733
|
How run Random Forest when there is temporal structure in the data
|
To apply Random Forest you dont need to check for any assumption. Take y=t,and x=t-1, t-2, t-3 (all lags you feel would help).
But instead of applying RF etc, go with Time series techniques like- Hybrid Model in R, which will give you ensemble of ARIMA, ETS, NN, TBATS, THETAM, STLM algorithms.
Another algo that handles multiple level of seasonality ( Facebook's Prophet model)-
https://machinelearningstories.blogspot.in/2017/05/facebooks-phophet-model-for-forecasting.html
|
How run Random Forest when there is temporal structure in the data
|
To apply Random Forest you dont need to check for any assumption. Take y=t,and x=t-1, t-2, t-3 (all lags you feel would help).
But instead of applying RF etc, go with Time series techniques like- Hybr
|
How run Random Forest when there is temporal structure in the data
To apply Random Forest you dont need to check for any assumption. Take y=t,and x=t-1, t-2, t-3 (all lags you feel would help).
But instead of applying RF etc, go with Time series techniques like- Hybrid Model in R, which will give you ensemble of ARIMA, ETS, NN, TBATS, THETAM, STLM algorithms.
Another algo that handles multiple level of seasonality ( Facebook's Prophet model)-
https://machinelearningstories.blogspot.in/2017/05/facebooks-phophet-model-for-forecasting.html
|
How run Random Forest when there is temporal structure in the data
To apply Random Forest you dont need to check for any assumption. Take y=t,and x=t-1, t-2, t-3 (all lags you feel would help).
But instead of applying RF etc, go with Time series techniques like- Hybr
|
43,734
|
Can one force an ARIMA forecast to be positive?
|
ARIMA model while forecasting the future values uses differencing method intenally to stationarize the data,The negative values predicted are differenced values if u convert them to actual values that will be your End Result!
|
Can one force an ARIMA forecast to be positive?
|
ARIMA model while forecasting the future values uses differencing method intenally to stationarize the data,The negative values predicted are differenced values if u convert them to actual values that
|
Can one force an ARIMA forecast to be positive?
ARIMA model while forecasting the future values uses differencing method intenally to stationarize the data,The negative values predicted are differenced values if u convert them to actual values that will be your End Result!
|
Can one force an ARIMA forecast to be positive?
ARIMA model while forecasting the future values uses differencing method intenally to stationarize the data,The negative values predicted are differenced values if u convert them to actual values that
|
43,735
|
Generate Posterior predictive distribution at every step in the MCMC chain for a hierarchical regression model
|
Sorry for my sloppy answer in advance.
You would just predict the value und sample from it in your Gibbs sampler. If you write your sampler yourself, otherwise I would suggest to use JAGS.
You can predict for each of the 160 groups individually, otherwise you would use the prior to predict, that you estimated from this analysis. I thought posterior predictive is the probability of p(y+1|X,Y,w) you have not 160 predictive distributions.
I think you don't compare posterior predictive distributions, you often want to compare the prior of the hierarchical model, to the estimated weights of the non-hierarchical model. Because the assumption is that effects get estimated "better" when modeling heterogeneity. Of course, you can predict unseen data and compare MSE and other stuff, too.
|
Generate Posterior predictive distribution at every step in the MCMC chain for a hierarchical regres
|
Sorry for my sloppy answer in advance.
You would just predict the value und sample from it in your Gibbs sampler. If you write your sampler yourself, otherwise I would suggest to use JAGS.
You can pre
|
Generate Posterior predictive distribution at every step in the MCMC chain for a hierarchical regression model
Sorry for my sloppy answer in advance.
You would just predict the value und sample from it in your Gibbs sampler. If you write your sampler yourself, otherwise I would suggest to use JAGS.
You can predict for each of the 160 groups individually, otherwise you would use the prior to predict, that you estimated from this analysis. I thought posterior predictive is the probability of p(y+1|X,Y,w) you have not 160 predictive distributions.
I think you don't compare posterior predictive distributions, you often want to compare the prior of the hierarchical model, to the estimated weights of the non-hierarchical model. Because the assumption is that effects get estimated "better" when modeling heterogeneity. Of course, you can predict unseen data and compare MSE and other stuff, too.
|
Generate Posterior predictive distribution at every step in the MCMC chain for a hierarchical regres
Sorry for my sloppy answer in advance.
You would just predict the value und sample from it in your Gibbs sampler. If you write your sampler yourself, otherwise I would suggest to use JAGS.
You can pre
|
43,736
|
Evening out a set of buckets
|
Try looking into MA(moving average) Times series. This evaluates the significance of a average based on data points spread over a specified amount of time(each day for example) and can determine if there are outliers in you data for any specific day and will determine the trending average for your data.
For the step 3 of your process look into exponential smoothing.
Here is a link that may help: http://www.itl.nist.gov/div898/handbook/pmc/section4/pmc4.htm
Also wiki: time series MA
|
Evening out a set of buckets
|
Try looking into MA(moving average) Times series. This evaluates the significance of a average based on data points spread over a specified amount of time(each day for example) and can determine if th
|
Evening out a set of buckets
Try looking into MA(moving average) Times series. This evaluates the significance of a average based on data points spread over a specified amount of time(each day for example) and can determine if there are outliers in you data for any specific day and will determine the trending average for your data.
For the step 3 of your process look into exponential smoothing.
Here is a link that may help: http://www.itl.nist.gov/div898/handbook/pmc/section4/pmc4.htm
Also wiki: time series MA
|
Evening out a set of buckets
Try looking into MA(moving average) Times series. This evaluates the significance of a average based on data points spread over a specified amount of time(each day for example) and can determine if th
|
43,737
|
Measurement error in maximum counts
|
It will be hard to even define what you mean by "measurement error of maximum counts".
In case of mean it is easy, because mean is a parameter of underlying theoretical distribution that generated your data. This parameter can be estimated along with its uncertainty.
Maximum, on the other hand, is not a parameter of the distribution - the distribution has no maximum! So when you speak about maximum, it is always maximum of your sample.
This puts Bayesian statistics off because it considers your data as fixed. You will have to use either some direct frequentist approach, which considers model as fixed and your data being actually sample of your model. The inference could be either direct or by using bootstrapping. I am not very strong in deriving complex frequentist maximum likelihood formulas, so I will just give you a bootstrapping example on your data:
library(boot)
counts <- data.frame(year = sort(rep(2000:2009, 12)), month = rep(month.abb,10), count = sample(1:500, 120, replace = T))
# this is how you compute the maximum
aggregate(counts$count, list(counts$month), max)
# function which does it for a sub-sample given by `indices`
month_max <- function (data, indices) {
d <- data[indices,] # allows boot to select sample
return (tapply(d$count, d$month, max))
}
# bootstrapping with 1000 replications
results <- boot(data=counts, statistic=month_max, R=1000)
results
# ORDINARY NONPARAMETRIC BOOTSTRAP
# [...]
# Bootstrap Statistics :
# original bias std. error
# t1* 466 -28.364 48.41140
# t2* 496 -27.725 40.78849
# t3* 455 -40.789 57.09997
# t4* 499 -32.997 47.74439
# t5* 466 -15.057 34.23477
# t6* 484 -15.966 39.79838
# t7* 491 -24.337 38.84459
# t8* 370 -24.701 39.31971
# t9* 474 -28.850 57.94352
# t10* 448 -23.793 59.52596
# t11* 446 -64.173 84.13633
# t12* 398 -22.229 36.31511
You see the results correspond to the real values, but also include a standard error. You can see the bias is quite high. This indicates that the "real" max value lies out of the sampled ones, which is normal for max function and will not happen for mean.
You can report the CI too (perhaps there is a better way, but this works):
for (i in 1:12) {
print(boot.ci(results, type="bca", index=i))
}
|
Measurement error in maximum counts
|
It will be hard to even define what you mean by "measurement error of maximum counts".
In case of mean it is easy, because mean is a parameter of underlying theoretical distribution that generated you
|
Measurement error in maximum counts
It will be hard to even define what you mean by "measurement error of maximum counts".
In case of mean it is easy, because mean is a parameter of underlying theoretical distribution that generated your data. This parameter can be estimated along with its uncertainty.
Maximum, on the other hand, is not a parameter of the distribution - the distribution has no maximum! So when you speak about maximum, it is always maximum of your sample.
This puts Bayesian statistics off because it considers your data as fixed. You will have to use either some direct frequentist approach, which considers model as fixed and your data being actually sample of your model. The inference could be either direct or by using bootstrapping. I am not very strong in deriving complex frequentist maximum likelihood formulas, so I will just give you a bootstrapping example on your data:
library(boot)
counts <- data.frame(year = sort(rep(2000:2009, 12)), month = rep(month.abb,10), count = sample(1:500, 120, replace = T))
# this is how you compute the maximum
aggregate(counts$count, list(counts$month), max)
# function which does it for a sub-sample given by `indices`
month_max <- function (data, indices) {
d <- data[indices,] # allows boot to select sample
return (tapply(d$count, d$month, max))
}
# bootstrapping with 1000 replications
results <- boot(data=counts, statistic=month_max, R=1000)
results
# ORDINARY NONPARAMETRIC BOOTSTRAP
# [...]
# Bootstrap Statistics :
# original bias std. error
# t1* 466 -28.364 48.41140
# t2* 496 -27.725 40.78849
# t3* 455 -40.789 57.09997
# t4* 499 -32.997 47.74439
# t5* 466 -15.057 34.23477
# t6* 484 -15.966 39.79838
# t7* 491 -24.337 38.84459
# t8* 370 -24.701 39.31971
# t9* 474 -28.850 57.94352
# t10* 448 -23.793 59.52596
# t11* 446 -64.173 84.13633
# t12* 398 -22.229 36.31511
You see the results correspond to the real values, but also include a standard error. You can see the bias is quite high. This indicates that the "real" max value lies out of the sampled ones, which is normal for max function and will not happen for mean.
You can report the CI too (perhaps there is a better way, but this works):
for (i in 1:12) {
print(boot.ci(results, type="bca", index=i))
}
|
Measurement error in maximum counts
It will be hard to even define what you mean by "measurement error of maximum counts".
In case of mean it is easy, because mean is a parameter of underlying theoretical distribution that generated you
|
43,738
|
Weak stationarity and ARMA-ARCH/GARCH models?
|
Strict stationarity is the strongest form of stationarity. It means that the joint statistical distribution of any collection of the time series variates never depends on time. So, the mean, variance and any moment of any variate is the same whichever variate you choose. However, for day to day use strict stationarity is too strict. Hence, the following weaker definition is often used instead. Stationarity of order 2 which includes a constant mean, a constant variance and an autocovariance that does not depend on time. (second-order stationary or stationary of order 2). A weaker form of stationarity that is first-order stationary which means that the mean is a constant function of time, time-varying means to obtain one which is first-order stationary.
Using traditional stationarity tests such us PP.test (Phillips-Perron Unit Root Test), kpss test or Augmented Dickey-Fuller Tests are not adequate if you are to perform regression via other methods than ARIMA (due that in Arima the orders are fixed and that no other factors that produce non stationarity are included in the model). For non Arima cases stationarity tests in the frequency domain are more adequate.
Tests in the frequency domain : The Priestley-Subba Rao (PSR) test for nonstationarity (fractal package). Based upon examining how homogeneous a set of spectral density function (SDF) estimates are across time, across frequency, or both.
The test you refer to is a test also in the frequency domain (which tests a second order unit root test) where the wavelet looks at a quantity called βj(t) which is closely related to a wavelet-based time-varying spectrum of the time series (it is a linear transform of the evolutionary wavelet spectrum of the locally stationary wavelet processes of Nason, von Sachs and Kroisandt, 2000). So we see if βj(t) function varies over time or is constant by looking at Haar wavelet coefficients of the estimate so is stationary if all haar coefficients are zero (locits package).
There are other concerns about stationarity such us long range dependence, fractional integrated processes (ARFIMA) where the term d (differenciation) refers to long term memory processes.
The effect of higher order non stationarity, long term dependencies is that they are in effect reflected systematically in the errors of a regression, however its impact and thus validity of the regression is difficult to measure
|
Weak stationarity and ARMA-ARCH/GARCH models?
|
Strict stationarity is the strongest form of stationarity. It means that the joint statistical distribution of any collection of the time series variates never depends on time. So, the mean, variance
|
Weak stationarity and ARMA-ARCH/GARCH models?
Strict stationarity is the strongest form of stationarity. It means that the joint statistical distribution of any collection of the time series variates never depends on time. So, the mean, variance and any moment of any variate is the same whichever variate you choose. However, for day to day use strict stationarity is too strict. Hence, the following weaker definition is often used instead. Stationarity of order 2 which includes a constant mean, a constant variance and an autocovariance that does not depend on time. (second-order stationary or stationary of order 2). A weaker form of stationarity that is first-order stationary which means that the mean is a constant function of time, time-varying means to obtain one which is first-order stationary.
Using traditional stationarity tests such us PP.test (Phillips-Perron Unit Root Test), kpss test or Augmented Dickey-Fuller Tests are not adequate if you are to perform regression via other methods than ARIMA (due that in Arima the orders are fixed and that no other factors that produce non stationarity are included in the model). For non Arima cases stationarity tests in the frequency domain are more adequate.
Tests in the frequency domain : The Priestley-Subba Rao (PSR) test for nonstationarity (fractal package). Based upon examining how homogeneous a set of spectral density function (SDF) estimates are across time, across frequency, or both.
The test you refer to is a test also in the frequency domain (which tests a second order unit root test) where the wavelet looks at a quantity called βj(t) which is closely related to a wavelet-based time-varying spectrum of the time series (it is a linear transform of the evolutionary wavelet spectrum of the locally stationary wavelet processes of Nason, von Sachs and Kroisandt, 2000). So we see if βj(t) function varies over time or is constant by looking at Haar wavelet coefficients of the estimate so is stationary if all haar coefficients are zero (locits package).
There are other concerns about stationarity such us long range dependence, fractional integrated processes (ARFIMA) where the term d (differenciation) refers to long term memory processes.
The effect of higher order non stationarity, long term dependencies is that they are in effect reflected systematically in the errors of a regression, however its impact and thus validity of the regression is difficult to measure
|
Weak stationarity and ARMA-ARCH/GARCH models?
Strict stationarity is the strongest form of stationarity. It means that the joint statistical distribution of any collection of the time series variates never depends on time. So, the mean, variance
|
43,739
|
Weak stationarity and ARMA-ARCH/GARCH models?
|
From: "Financial Econometrics: From basics to advanced modeling techniques" Rachev, Mittnik et al. (Wiley 2006).
|
Weak stationarity and ARMA-ARCH/GARCH models?
|
From: "Financial Econometrics: From basics to advanced modeling techniques" Rachev, Mittnik et al. (Wiley 2006).
|
Weak stationarity and ARMA-ARCH/GARCH models?
From: "Financial Econometrics: From basics to advanced modeling techniques" Rachev, Mittnik et al. (Wiley 2006).
|
Weak stationarity and ARMA-ARCH/GARCH models?
From: "Financial Econometrics: From basics to advanced modeling techniques" Rachev, Mittnik et al. (Wiley 2006).
|
43,740
|
Weak stationarity and ARMA-ARCH/GARCH models?
|
You can use the following statistical test for your issue :
Sanso, A., Arago, V., and Carrion, J. (2004), “Testing for Changes in the Unconditional Variance of Financial Time Series,” Revista de Economia Financiera,4, 32–53.
As a result, you will know if the UNconditional variance of your time series can be considered constant or not (from a given confidence level).
Their test statistic can be easily implemented.
Enjoy!
|
Weak stationarity and ARMA-ARCH/GARCH models?
|
You can use the following statistical test for your issue :
Sanso, A., Arago, V., and Carrion, J. (2004), “Testing for Changes in the Unconditional Variance of Financial Time Series,” Revista de Econo
|
Weak stationarity and ARMA-ARCH/GARCH models?
You can use the following statistical test for your issue :
Sanso, A., Arago, V., and Carrion, J. (2004), “Testing for Changes in the Unconditional Variance of Financial Time Series,” Revista de Economia Financiera,4, 32–53.
As a result, you will know if the UNconditional variance of your time series can be considered constant or not (from a given confidence level).
Their test statistic can be easily implemented.
Enjoy!
|
Weak stationarity and ARMA-ARCH/GARCH models?
You can use the following statistical test for your issue :
Sanso, A., Arago, V., and Carrion, J. (2004), “Testing for Changes in the Unconditional Variance of Financial Time Series,” Revista de Econo
|
43,741
|
Weak stationarity and ARMA-ARCH/GARCH models?
|
As a practial "test" you could estimate your GARCH model on several subsamples and simply see if the unconditonal variance c*(1-(a+b))^-1 changes a lot or not.
|
Weak stationarity and ARMA-ARCH/GARCH models?
|
As a practial "test" you could estimate your GARCH model on several subsamples and simply see if the unconditonal variance c*(1-(a+b))^-1 changes a lot or not.
|
Weak stationarity and ARMA-ARCH/GARCH models?
As a practial "test" you could estimate your GARCH model on several subsamples and simply see if the unconditonal variance c*(1-(a+b))^-1 changes a lot or not.
|
Weak stationarity and ARMA-ARCH/GARCH models?
As a practial "test" you could estimate your GARCH model on several subsamples and simply see if the unconditonal variance c*(1-(a+b))^-1 changes a lot or not.
|
43,742
|
Weak stationarity and ARMA-ARCH/GARCH models?
|
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.
I think it's imposible to prove if the unconditional variance is constant in his time serie, because you have only one realization of you underlying process. But someone here can to know how to extrapolate the conclusions to all possible realizations (and therefore to unconditional variance) with a single realization of the serie without using assumptions for ergodicity. I am not sure how this assumption works, but I would say that there is the key.
|
Weak stationarity and ARMA-ARCH/GARCH models?
|
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.
|
Weak stationarity and ARMA-ARCH/GARCH models?
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.
I think it's imposible to prove if the unconditional variance is constant in his time serie, because you have only one realization of you underlying process. But someone here can to know how to extrapolate the conclusions to all possible realizations (and therefore to unconditional variance) with a single realization of the serie without using assumptions for ergodicity. I am not sure how this assumption works, but I would say that there is the key.
|
Weak stationarity and ARMA-ARCH/GARCH models?
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.
|
43,743
|
Weak stationarity and ARMA-ARCH/GARCH models?
|
I believe you could use ADF test (unit root test) on the squared series for stationarity check of ARCH/GARCH models. Essentially, ARCH model is about the auto-correlation in squared Yt while ARMA model is about auto-correlation of Yt itself. ARCH model gives the equation below and note that if this holds, the unconditional variance is constant $\frac{w}{1-\alpha}$
.
$$E(r_t^2|r_{t-1}, r_{t-2},...) = E(\sigma_t^2e_t^2|r_{t-1}, r_{t-2},...)
= \sigma_t^2 = w + \alpha*r_{t-1}^2$$
So this can be thought of as an AR(1) process of $r_{t}^2$. Stationarity requires $\alpha <1 $ so the ADF could be applied here while treating $r_{t}^2$ as $s_{t}$.
However here is some research pointing out that the unit root test "should be expected to have very poor size properties and so they attached little significance to the rejection of the unit root null". For detailed discussions, this paper by Wright (1999) compared the standard unit root test on volatility agaist the modified unit root approach proposed by Perron and Ng, which proved to be a better test method.
References
Wright, J. H. (1999). Testing for a unit root in the volatility of asset returns. Journal of Applied Econometrics, 309-318.
|
Weak stationarity and ARMA-ARCH/GARCH models?
|
I believe you could use ADF test (unit root test) on the squared series for stationarity check of ARCH/GARCH models. Essentially, ARCH model is about the auto-correlation in squared Yt while ARMA mode
|
Weak stationarity and ARMA-ARCH/GARCH models?
I believe you could use ADF test (unit root test) on the squared series for stationarity check of ARCH/GARCH models. Essentially, ARCH model is about the auto-correlation in squared Yt while ARMA model is about auto-correlation of Yt itself. ARCH model gives the equation below and note that if this holds, the unconditional variance is constant $\frac{w}{1-\alpha}$
.
$$E(r_t^2|r_{t-1}, r_{t-2},...) = E(\sigma_t^2e_t^2|r_{t-1}, r_{t-2},...)
= \sigma_t^2 = w + \alpha*r_{t-1}^2$$
So this can be thought of as an AR(1) process of $r_{t}^2$. Stationarity requires $\alpha <1 $ so the ADF could be applied here while treating $r_{t}^2$ as $s_{t}$.
However here is some research pointing out that the unit root test "should be expected to have very poor size properties and so they attached little significance to the rejection of the unit root null". For detailed discussions, this paper by Wright (1999) compared the standard unit root test on volatility agaist the modified unit root approach proposed by Perron and Ng, which proved to be a better test method.
References
Wright, J. H. (1999). Testing for a unit root in the volatility of asset returns. Journal of Applied Econometrics, 309-318.
|
Weak stationarity and ARMA-ARCH/GARCH models?
I believe you could use ADF test (unit root test) on the squared series for stationarity check of ARCH/GARCH models. Essentially, ARCH model is about the auto-correlation in squared Yt while ARMA mode
|
43,744
|
Weak stationarity and ARMA-ARCH/GARCH models?
|
Standard ARMA models assume the unconditional mean and unconditional
variance to be constant. For ARMA-GARCH models this is also the case
I don't think it is true, they're constant conditional variance models, see e.g. MATLAB's help on ARMA and GARCH. Whether you have to test before or after applying the model is up to you. We usually have a battery of standard tests, including ADF and Engle's ARCH, applied to our series during the data exploration phase. We never jump right into modeling before understanding the series, gathering literature, studying their basic time series properties such trends and cycles etc.
However, for the purposes of exposition, you can always apply the model then test the residuals for unit-root and homoscedasticity assumptions if they were implied, such as in constant conditional variance models.
|
Weak stationarity and ARMA-ARCH/GARCH models?
|
Standard ARMA models assume the unconditional mean and unconditional
variance to be constant. For ARMA-GARCH models this is also the case
I don't think it is true, they're constant conditional vari
|
Weak stationarity and ARMA-ARCH/GARCH models?
Standard ARMA models assume the unconditional mean and unconditional
variance to be constant. For ARMA-GARCH models this is also the case
I don't think it is true, they're constant conditional variance models, see e.g. MATLAB's help on ARMA and GARCH. Whether you have to test before or after applying the model is up to you. We usually have a battery of standard tests, including ADF and Engle's ARCH, applied to our series during the data exploration phase. We never jump right into modeling before understanding the series, gathering literature, studying their basic time series properties such trends and cycles etc.
However, for the purposes of exposition, you can always apply the model then test the residuals for unit-root and homoscedasticity assumptions if they were implied, such as in constant conditional variance models.
|
Weak stationarity and ARMA-ARCH/GARCH models?
Standard ARMA models assume the unconditional mean and unconditional
variance to be constant. For ARMA-GARCH models this is also the case
I don't think it is true, they're constant conditional vari
|
43,745
|
Error in estimation with continuous data
|
The following steps will help you calculate an estimated error term in continuous data. Although I deal mainly with psychology research, I think you are looking to calculate an error term and confidence interval. Here is an example I adapted from somewhere else but shows the step by step calculation of a 95% confidence interval.
Let’s assume a sample of 30 (n=30), and that their average score is x̄=118.3, with a standard deviation of 11.4 (SD=11.4). So let’s find the 95% confidence interval for the population mean.
Definition of terms:
a) α = 1 - degree of confidence (you could choose .95, .99, etc.) , so 1 - .95 = .05.
b) Let t(α/2) be the t-value for a two-tailed distribution.
c) x̄ is the sample mean.
So,
Step 1: The maximum error is:
Error = t(α/2) * SD/sqrt(n)
We know that SD = 11.4 and n = 30, but we need t(α/2).
Step 2: To find t(α /2), we look in a Student t distribution table (if your sample (n) is greater than 30 you could use the standard t distribution table) with .05 in two tails and with 29 (that's n-1 or 30-1) degrees of freedom. We get 2.045. You could find this table in online or in the back of most stats text books.
3) Now back to our formula in step 2.
E = 2.045 *11.4/Sqrt(30) =4.256
4) Finally, the interval is:
x̄ + or - E = 118.3 + 4.256 and E = 118.3 - 4.256
You could now say 95 out of 100 times the mean score would fall somewhere between 114.044 to 122.556 of the mean score.
|
Error in estimation with continuous data
|
The following steps will help you calculate an estimated error term in continuous data. Although I deal mainly with psychology research, I think you are looking to calculate an error term and confiden
|
Error in estimation with continuous data
The following steps will help you calculate an estimated error term in continuous data. Although I deal mainly with psychology research, I think you are looking to calculate an error term and confidence interval. Here is an example I adapted from somewhere else but shows the step by step calculation of a 95% confidence interval.
Let’s assume a sample of 30 (n=30), and that their average score is x̄=118.3, with a standard deviation of 11.4 (SD=11.4). So let’s find the 95% confidence interval for the population mean.
Definition of terms:
a) α = 1 - degree of confidence (you could choose .95, .99, etc.) , so 1 - .95 = .05.
b) Let t(α/2) be the t-value for a two-tailed distribution.
c) x̄ is the sample mean.
So,
Step 1: The maximum error is:
Error = t(α/2) * SD/sqrt(n)
We know that SD = 11.4 and n = 30, but we need t(α/2).
Step 2: To find t(α /2), we look in a Student t distribution table (if your sample (n) is greater than 30 you could use the standard t distribution table) with .05 in two tails and with 29 (that's n-1 or 30-1) degrees of freedom. We get 2.045. You could find this table in online or in the back of most stats text books.
3) Now back to our formula in step 2.
E = 2.045 *11.4/Sqrt(30) =4.256
4) Finally, the interval is:
x̄ + or - E = 118.3 + 4.256 and E = 118.3 - 4.256
You could now say 95 out of 100 times the mean score would fall somewhere between 114.044 to 122.556 of the mean score.
|
Error in estimation with continuous data
The following steps will help you calculate an estimated error term in continuous data. Although I deal mainly with psychology research, I think you are looking to calculate an error term and confiden
|
43,746
|
What is the equivalent of a standard deviation when considering a least squares fit line?
|
As the question is now posed you are looking for the standard deviation to multiple by the appropriate tabled k for prediction one-sided tolerance interval for y given x. The appropriate standard deviation is the standard deviation of the prediction estimate of y given x not the standard deviation of the residuals. The right standard deviation is obtained by taking the variance for the fitted y given x and adding one estimate of the residual variance and taking the square root. This is because the prediction is the same as the fitted value but the actual value of a new y at the given x differs from the "true" model by an independent error term. So to take account of that the residual variance must be added to the variance of the difference between the "true" y given x and the model fit for it. The sample estimate just replaces the true variance terms with the estimates used in the regression for fit and the error term.
The resulting formulae taken from Chernick 2011 "The Essentials of Biostatistics for Physicians, Nurses, and Clinicians" pp. 102-103 is as follows:
SSx = ∑(X$_i$ - X$_b$)$^2$ where X$_b$ = ∑X$_i$/n
SSE = ∑(Y$_i$ - Y$_b$)$^2$ where Y$_b$ = ∑Y$_i$/n
Then the standard error of the estimate is S$_y$$_.$$_x$=√[SSE/(n-2)].
Next we have the standard error for the fitted Y given X=x is as follows:
SE(Y^) = S$_y$$_.$$_x$ √[(x-X$_b$)$^2$/SSx+1/n] But for prediction we need to add one more
S$_y$$_.$$_x$$^2$ term to the get the variance of the prediction. Hence the standard error for prediction of Y given X=x is:
SE(Y$_p$$_r$$_e$$_d$)= S$_y$$_.$$_x$ √[1+(x-X$_b$)$^2$/SSx+1/n].
The constant you need with it will be the one for one-sided Gaussian confidence intervals for the confidence level and coverage that you specify. The tables can be found in the statistical intervals book by Hahn and Meeker.
|
What is the equivalent of a standard deviation when considering a least squares fit line?
|
As the question is now posed you are looking for the standard deviation to multiple by the appropriate tabled k for prediction one-sided tolerance interval for y given x. The appropriate standard de
|
What is the equivalent of a standard deviation when considering a least squares fit line?
As the question is now posed you are looking for the standard deviation to multiple by the appropriate tabled k for prediction one-sided tolerance interval for y given x. The appropriate standard deviation is the standard deviation of the prediction estimate of y given x not the standard deviation of the residuals. The right standard deviation is obtained by taking the variance for the fitted y given x and adding one estimate of the residual variance and taking the square root. This is because the prediction is the same as the fitted value but the actual value of a new y at the given x differs from the "true" model by an independent error term. So to take account of that the residual variance must be added to the variance of the difference between the "true" y given x and the model fit for it. The sample estimate just replaces the true variance terms with the estimates used in the regression for fit and the error term.
The resulting formulae taken from Chernick 2011 "The Essentials of Biostatistics for Physicians, Nurses, and Clinicians" pp. 102-103 is as follows:
SSx = ∑(X$_i$ - X$_b$)$^2$ where X$_b$ = ∑X$_i$/n
SSE = ∑(Y$_i$ - Y$_b$)$^2$ where Y$_b$ = ∑Y$_i$/n
Then the standard error of the estimate is S$_y$$_.$$_x$=√[SSE/(n-2)].
Next we have the standard error for the fitted Y given X=x is as follows:
SE(Y^) = S$_y$$_.$$_x$ √[(x-X$_b$)$^2$/SSx+1/n] But for prediction we need to add one more
S$_y$$_.$$_x$$^2$ term to the get the variance of the prediction. Hence the standard error for prediction of Y given X=x is:
SE(Y$_p$$_r$$_e$$_d$)= S$_y$$_.$$_x$ √[1+(x-X$_b$)$^2$/SSx+1/n].
The constant you need with it will be the one for one-sided Gaussian confidence intervals for the confidence level and coverage that you specify. The tables can be found in the statistical intervals book by Hahn and Meeker.
|
What is the equivalent of a standard deviation when considering a least squares fit line?
As the question is now posed you are looking for the standard deviation to multiple by the appropriate tabled k for prediction one-sided tolerance interval for y given x. The appropriate standard de
|
43,747
|
Bayesian hyperparameter optimization + cross-validation
|
My demonstration code is here. Check it out, then come back here and read/leave comments. If you want to edit my code to make it run on a wider variety of machines that would be wonderful; just submit a pull request and/or fork the code yourself and let me know as a courtesy.
Cross-validation is an approximation of Bayesian optimization, so it is not necessary to use it with Optuna. However, if it makes sense and you have the time to do it, it will simply result in meta-optimization.
I realized this yesterday when I was setting up a parameter study and realized it would take months, not just days, to complete. Here is how I had it set up initially:
Combine MNIST training and test sets into a single data set, then train and validate $n$ times (for MNIST combined, $n = 70,000$) holding $n_v = 65,697$ samples, randomly chosen, out for validation during each training epoch in each cross-validation replicate.
Train each replicate's model using $n_c = 4,303$ samples not held out for validation (with loss at end of each epoch computed on held-out $n_v$ samples) until validation loss ceases to decrease for a specified number of epochs (via Keras' EarlyStopping callback with patience parameter). Report the model's performance to Optuna as the average validation loss for the best trained model over all replicates. See below for how to choose $n_c = n - n_v$ (training set size).
Combine steps 1 and 2 into an objective function for Optuna to minimize average validation loss. Perform the study, being sure to specify that direction='minimize'.
What I ended up using instead was something that took only a few minutes (maximum) per Optuna trial, instead of 70,000 times longer:
Load MNIST training and test sets separately and hold $n_v = n - n_c$ samples out from the training set only, randomly chosen, for validation during each training epoch.
Train a single model using $n_c$ samples (for MNIST, this was 3,833) until validation loss (computed on held-out $n_v = n - n_c$ samples) ceases to decrease for a few epochs (as in Keras' EarlyStopping callback with patience parameter). Evaluate the performance of the model with lowest validation loss by inferencing on the test data set (not involved in either training or validation) and calculating probabilities involved by any relevant consequences as a measure of risk (if possible).
Combine steps 1 and 2 into an objective function for Optuna to minimize or maximize (depending on the risk/evaluation metric). Then perform the study, being sure to specify the direction of optimization (either direction='maximize' or direction='minimize' as appropriate).
NOTE: In this case $n_c = n^{3/4}$ based on the article cited below; normally people use less than half the data for validation but in this case it will always be no more than half for training, and usually far less. Also, repeating the training and validation steps at least $n$ times was required by the same article. Even though I am not doing cross-validation, I am still performing validation during training, so despite the lack of a theoretical basis for doing so, I am still using this exponential calculation for the size of the training set. Common practice is to hold out 1/5 of data (or 1/K for K folds) for validation. In this case, I am holding out $1 - n^{3/4}$ proportion of the data for validation, which ends up being more than 1/2 of the entire data set always.
Author: Shao, Jun
Article: Linear model selection by cross-validation
Publication info: Journal of the American Statistical Association ; Alexandria Vol. 88, Iss. 422, (Jun 1993): 486.
Abstract: The problem of selecting a model having the best predictive value among a class of linear models is considered. Motivations, justifications and discussions of some practical aspects of the use of the leave-nv-out cross-validation method are provided, and results from a simulation study are presented.
|
Bayesian hyperparameter optimization + cross-validation
|
My demonstration code is here. Check it out, then come back here and read/leave comments. If you want to edit my code to make it run on a wider variety of machines that would be wonderful; just subm
|
Bayesian hyperparameter optimization + cross-validation
My demonstration code is here. Check it out, then come back here and read/leave comments. If you want to edit my code to make it run on a wider variety of machines that would be wonderful; just submit a pull request and/or fork the code yourself and let me know as a courtesy.
Cross-validation is an approximation of Bayesian optimization, so it is not necessary to use it with Optuna. However, if it makes sense and you have the time to do it, it will simply result in meta-optimization.
I realized this yesterday when I was setting up a parameter study and realized it would take months, not just days, to complete. Here is how I had it set up initially:
Combine MNIST training and test sets into a single data set, then train and validate $n$ times (for MNIST combined, $n = 70,000$) holding $n_v = 65,697$ samples, randomly chosen, out for validation during each training epoch in each cross-validation replicate.
Train each replicate's model using $n_c = 4,303$ samples not held out for validation (with loss at end of each epoch computed on held-out $n_v$ samples) until validation loss ceases to decrease for a specified number of epochs (via Keras' EarlyStopping callback with patience parameter). Report the model's performance to Optuna as the average validation loss for the best trained model over all replicates. See below for how to choose $n_c = n - n_v$ (training set size).
Combine steps 1 and 2 into an objective function for Optuna to minimize average validation loss. Perform the study, being sure to specify that direction='minimize'.
What I ended up using instead was something that took only a few minutes (maximum) per Optuna trial, instead of 70,000 times longer:
Load MNIST training and test sets separately and hold $n_v = n - n_c$ samples out from the training set only, randomly chosen, for validation during each training epoch.
Train a single model using $n_c$ samples (for MNIST, this was 3,833) until validation loss (computed on held-out $n_v = n - n_c$ samples) ceases to decrease for a few epochs (as in Keras' EarlyStopping callback with patience parameter). Evaluate the performance of the model with lowest validation loss by inferencing on the test data set (not involved in either training or validation) and calculating probabilities involved by any relevant consequences as a measure of risk (if possible).
Combine steps 1 and 2 into an objective function for Optuna to minimize or maximize (depending on the risk/evaluation metric). Then perform the study, being sure to specify the direction of optimization (either direction='maximize' or direction='minimize' as appropriate).
NOTE: In this case $n_c = n^{3/4}$ based on the article cited below; normally people use less than half the data for validation but in this case it will always be no more than half for training, and usually far less. Also, repeating the training and validation steps at least $n$ times was required by the same article. Even though I am not doing cross-validation, I am still performing validation during training, so despite the lack of a theoretical basis for doing so, I am still using this exponential calculation for the size of the training set. Common practice is to hold out 1/5 of data (or 1/K for K folds) for validation. In this case, I am holding out $1 - n^{3/4}$ proportion of the data for validation, which ends up being more than 1/2 of the entire data set always.
Author: Shao, Jun
Article: Linear model selection by cross-validation
Publication info: Journal of the American Statistical Association ; Alexandria Vol. 88, Iss. 422, (Jun 1993): 486.
Abstract: The problem of selecting a model having the best predictive value among a class of linear models is considered. Motivations, justifications and discussions of some practical aspects of the use of the leave-nv-out cross-validation method are provided, and results from a simulation study are presented.
|
Bayesian hyperparameter optimization + cross-validation
My demonstration code is here. Check it out, then come back here and read/leave comments. If you want to edit my code to make it run on a wider variety of machines that would be wonderful; just subm
|
43,748
|
What to do if your regression residuals aren't normally distributed, cannot be transformed and do not conform even when outliers are removed?
|
2 paths :
Zero Inflated Models
Non-parametric ANOVA , Kruskal Wallis based on ranks
In his place, I would run a Krukal Wallis anova on counts ~ categories that doesnt require the two anova assumptions normality of residuals and heteroscédasticity. Furthermore, if I want a regression model, I would use a Zero Inflated Poisson because its an ecological count data (sparsity) , and finally, if more than that, the data is overdispersed, I would look at the Zero Inflated Binomial model. In anyway I would compare the ZIP and the ZINB based on Log Likelihood (AIC, BIC too...)
|
What to do if your regression residuals aren't normally distributed, cannot be transformed and do no
|
2 paths :
Zero Inflated Models
Non-parametric ANOVA , Kruskal Wallis based on ranks
In his place, I would run a Krukal Wallis anova on counts ~ categories that doesnt require the two anova assumpti
|
What to do if your regression residuals aren't normally distributed, cannot be transformed and do not conform even when outliers are removed?
2 paths :
Zero Inflated Models
Non-parametric ANOVA , Kruskal Wallis based on ranks
In his place, I would run a Krukal Wallis anova on counts ~ categories that doesnt require the two anova assumptions normality of residuals and heteroscédasticity. Furthermore, if I want a regression model, I would use a Zero Inflated Poisson because its an ecological count data (sparsity) , and finally, if more than that, the data is overdispersed, I would look at the Zero Inflated Binomial model. In anyway I would compare the ZIP and the ZINB based on Log Likelihood (AIC, BIC too...)
|
What to do if your regression residuals aren't normally distributed, cannot be transformed and do no
2 paths :
Zero Inflated Models
Non-parametric ANOVA , Kruskal Wallis based on ranks
In his place, I would run a Krukal Wallis anova on counts ~ categories that doesnt require the two anova assumpti
|
43,749
|
What's the name for this statistical fallacy?
|
General case of survivors fallacy:
Looking only at/for things that didn't fail skews your perception. This may lead you into an untested and thus failure intolerant behaviour.
The usual example is observing planes returning from air combat:
"Do you need to increase armor in places where the returning planes were hit?" Supposedly it's where planes are likely to be hit.
However the answer is counter-intuitively "No, because that's where planes are likely to be hit and survive." So hits there are survivable anyway.
You achieve real results, when you increase armor in places the "survivors" have not been hit, because that's where the "non-survivors" were hit.
For your case (singular):
Under the precondition of moving a single person into an area with incidents leading to deaths.
Do I need to move into a sub-area that has not been hit by an incident?
No, for those sub-areas you simply have no conclusive data.
Instead you need to move into a sub-area where incidents do happen but don't lead to deaths. The goal is not to have no incident but to survive it, in case it happens, right?
If you don't want the incident to happen, you shouldn't move into the larger area in the first place!
For your case (plural):
If you want to move a statistically relevant number of people into the area where incidents are survivable, you need to first check, if the reason incidents are survivable is low population density in said area.
If incidents are survivable in low density population areas, moving people in wouldn't make the people safe but the area unsafe.
Another view on things:
If there are 1000 people in the larger area, of which 20 died in the last incident, then there are still 980 survivors left to tell the tale. Is it safe, because more people survived than died?
Surely most of the 980 people weren't even close to the 20 that died, when it happened. Does it become any safer, if you just ask those?
Can you ask the 20 dead people, if they'd still consider it safe?
Bottom line is, you'll feel safe as long as you ask survivors, who didn't witness the incident. Since you can only ask survivors, it's probable they didn't witness the incident.
Hence, Survivors fallacy.
Related fallacies:
Others have mentioned other fallacies. I don't want to repeat them in detail. However I do see that they apply as well. So here's a compilation and the aspects why they apply and why they are different:
Survivors fallacy: Concentrating on favourable results only.
Texas Sharpshooter fallacy: Choosing a sub-sample in hindsight.
Hot hand fallacy: Interpreting random variation of results as indication of probability distribution, especially when looking at most recent history.
Small numbers law: Relying on insufficient data.
Base rate fallacy: Underestimating the importance of general information in favour of more specific information.
There's another well-known fallacy that I originally mistook for "Hot hand". Now that I think about it, it actually doesn't apply:
Gambler's fallacy: Misunderstanding the law of large numbers to mean that independent events would even out in the long run.
It's kind of inverted Hot hand fallacy:
Falling for "Hot hand" you'd bet on what happened most often in recent history, because it seems more likely.
Falling for "Gambler" you'd bet against what happened most often, because the opposite seems in need to even out in the long run.
|
What's the name for this statistical fallacy?
|
General case of survivors fallacy:
Looking only at/for things that didn't fail skews your perception. This may lead you into an untested and thus failure intolerant behaviour.
The usual example is obs
|
What's the name for this statistical fallacy?
General case of survivors fallacy:
Looking only at/for things that didn't fail skews your perception. This may lead you into an untested and thus failure intolerant behaviour.
The usual example is observing planes returning from air combat:
"Do you need to increase armor in places where the returning planes were hit?" Supposedly it's where planes are likely to be hit.
However the answer is counter-intuitively "No, because that's where planes are likely to be hit and survive." So hits there are survivable anyway.
You achieve real results, when you increase armor in places the "survivors" have not been hit, because that's where the "non-survivors" were hit.
For your case (singular):
Under the precondition of moving a single person into an area with incidents leading to deaths.
Do I need to move into a sub-area that has not been hit by an incident?
No, for those sub-areas you simply have no conclusive data.
Instead you need to move into a sub-area where incidents do happen but don't lead to deaths. The goal is not to have no incident but to survive it, in case it happens, right?
If you don't want the incident to happen, you shouldn't move into the larger area in the first place!
For your case (plural):
If you want to move a statistically relevant number of people into the area where incidents are survivable, you need to first check, if the reason incidents are survivable is low population density in said area.
If incidents are survivable in low density population areas, moving people in wouldn't make the people safe but the area unsafe.
Another view on things:
If there are 1000 people in the larger area, of which 20 died in the last incident, then there are still 980 survivors left to tell the tale. Is it safe, because more people survived than died?
Surely most of the 980 people weren't even close to the 20 that died, when it happened. Does it become any safer, if you just ask those?
Can you ask the 20 dead people, if they'd still consider it safe?
Bottom line is, you'll feel safe as long as you ask survivors, who didn't witness the incident. Since you can only ask survivors, it's probable they didn't witness the incident.
Hence, Survivors fallacy.
Related fallacies:
Others have mentioned other fallacies. I don't want to repeat them in detail. However I do see that they apply as well. So here's a compilation and the aspects why they apply and why they are different:
Survivors fallacy: Concentrating on favourable results only.
Texas Sharpshooter fallacy: Choosing a sub-sample in hindsight.
Hot hand fallacy: Interpreting random variation of results as indication of probability distribution, especially when looking at most recent history.
Small numbers law: Relying on insufficient data.
Base rate fallacy: Underestimating the importance of general information in favour of more specific information.
There's another well-known fallacy that I originally mistook for "Hot hand". Now that I think about it, it actually doesn't apply:
Gambler's fallacy: Misunderstanding the law of large numbers to mean that independent events would even out in the long run.
It's kind of inverted Hot hand fallacy:
Falling for "Hot hand" you'd bet on what happened most often in recent history, because it seems more likely.
Falling for "Gambler" you'd bet against what happened most often, because the opposite seems in need to even out in the long run.
|
What's the name for this statistical fallacy?
General case of survivors fallacy:
Looking only at/for things that didn't fail skews your perception. This may lead you into an untested and thus failure intolerant behaviour.
The usual example is obs
|
43,750
|
What's the name for this statistical fallacy?
|
I don't have a specific name for the fallacy, but here is a reference that I think is relevant (along the law of small numbers line):
The Most Dangerous Equation
Also a statistical rule of thumb (see section 2.9) says that an approximate 95% confidence interval for the 2 year incidence rate given none in 2 years would be from 0 to $\frac{3}{50}$, so the incidence could be as high as 6%. So if you moved another 1,000 people in then it would not be surprising to see 60 incidences in the next 2 years.
Thinking about it more, if the small area was chosen because of no incidences and there are some in the larger area, then this would be a variation on the Texas Sharpshooter Fallacy.
|
What's the name for this statistical fallacy?
|
I don't have a specific name for the fallacy, but here is a reference that I think is relevant (along the law of small numbers line):
The Most Dangerous Equation
Also a statistical rule of thumb (see
|
What's the name for this statistical fallacy?
I don't have a specific name for the fallacy, but here is a reference that I think is relevant (along the law of small numbers line):
The Most Dangerous Equation
Also a statistical rule of thumb (see section 2.9) says that an approximate 95% confidence interval for the 2 year incidence rate given none in 2 years would be from 0 to $\frac{3}{50}$, so the incidence could be as high as 6%. So if you moved another 1,000 people in then it would not be surprising to see 60 incidences in the next 2 years.
Thinking about it more, if the small area was chosen because of no incidences and there are some in the larger area, then this would be a variation on the Texas Sharpshooter Fallacy.
|
What's the name for this statistical fallacy?
I don't have a specific name for the fallacy, but here is a reference that I think is relevant (along the law of small numbers line):
The Most Dangerous Equation
Also a statistical rule of thumb (see
|
43,751
|
What's the name for this statistical fallacy?
|
The plural of "anecdote" is not "data."
(Also quoted at https://stats.stackexchange.com/a/8404.)
|
What's the name for this statistical fallacy?
|
The plural of "anecdote" is not "data."
(Also quoted at https://stats.stackexchange.com/a/8404.)
|
What's the name for this statistical fallacy?
The plural of "anecdote" is not "data."
(Also quoted at https://stats.stackexchange.com/a/8404.)
|
What's the name for this statistical fallacy?
The plural of "anecdote" is not "data."
(Also quoted at https://stats.stackexchange.com/a/8404.)
|
43,752
|
What's the name for this statistical fallacy?
|
This is not a fallacy, but rather the Problem of induction, as popularized by David Hume.
|
What's the name for this statistical fallacy?
|
This is not a fallacy, but rather the Problem of induction, as popularized by David Hume.
|
What's the name for this statistical fallacy?
This is not a fallacy, but rather the Problem of induction, as popularized by David Hume.
|
What's the name for this statistical fallacy?
This is not a fallacy, but rather the Problem of induction, as popularized by David Hume.
|
43,753
|
What's the name for this statistical fallacy?
|
It also sounds like the parable of the thanksgiving turkey:
http://www.businessinsider.com/nassim-talebs-black-swan-thanksgiving-turkey-2014-11
Every morning the farmer feeds the turkey well. After 1000 days the turkey argues that the farmer is benevolent and the pattern will continue. But day 1001 is Thanksgiving...
(Note for global readers: Thanksgiving is a US holiday on which it's customary to eat turkey.)
|
What's the name for this statistical fallacy?
|
It also sounds like the parable of the thanksgiving turkey:
http://www.businessinsider.com/nassim-talebs-black-swan-thanksgiving-turkey-2014-11
Every morning the farmer feeds the turkey well. After
|
What's the name for this statistical fallacy?
It also sounds like the parable of the thanksgiving turkey:
http://www.businessinsider.com/nassim-talebs-black-swan-thanksgiving-turkey-2014-11
Every morning the farmer feeds the turkey well. After 1000 days the turkey argues that the farmer is benevolent and the pattern will continue. But day 1001 is Thanksgiving...
(Note for global readers: Thanksgiving is a US holiday on which it's customary to eat turkey.)
|
What's the name for this statistical fallacy?
It also sounds like the parable of the thanksgiving turkey:
http://www.businessinsider.com/nassim-talebs-black-swan-thanksgiving-turkey-2014-11
Every morning the farmer feeds the turkey well. After
|
43,754
|
What's the name for this statistical fallacy?
|
This sounds like the hot hand fallacy to me.
https://en.wikipedia.org/wiki/Hot-hand_fallacy
When teaching intro stats I found a lot of students fell for this fallacy. So the idea is in basketball sense, he made X amount of shots he is more likely to make the X + 1 shot. Same idea here X amount of people live here with no incidents therefore no incidents should occur if X + 1 people are present.
|
What's the name for this statistical fallacy?
|
This sounds like the hot hand fallacy to me.
https://en.wikipedia.org/wiki/Hot-hand_fallacy
When teaching intro stats I found a lot of students fell for this fallacy. So the idea is in basketball sen
|
What's the name for this statistical fallacy?
This sounds like the hot hand fallacy to me.
https://en.wikipedia.org/wiki/Hot-hand_fallacy
When teaching intro stats I found a lot of students fell for this fallacy. So the idea is in basketball sense, he made X amount of shots he is more likely to make the X + 1 shot. Same idea here X amount of people live here with no incidents therefore no incidents should occur if X + 1 people are present.
|
What's the name for this statistical fallacy?
This sounds like the hot hand fallacy to me.
https://en.wikipedia.org/wiki/Hot-hand_fallacy
When teaching intro stats I found a lot of students fell for this fallacy. So the idea is in basketball sen
|
43,755
|
What's the name for this statistical fallacy?
|
This is the base rate fallacy:
If presented with related base rate information (i.e. generic, general information) and specific information (information only pertaining to a certain case), the mind tends to ignore the former and focus on the latter.
In this case, the base rate of death is quite high, but the specific information is that there are at least 50 people living in the area who have been unharmed.
|
What's the name for this statistical fallacy?
|
This is the base rate fallacy:
If presented with related base rate information (i.e. generic, general information) and specific information (information only pertaining to a certain case), the mind t
|
What's the name for this statistical fallacy?
This is the base rate fallacy:
If presented with related base rate information (i.e. generic, general information) and specific information (information only pertaining to a certain case), the mind tends to ignore the former and focus on the latter.
In this case, the base rate of death is quite high, but the specific information is that there are at least 50 people living in the area who have been unharmed.
|
What's the name for this statistical fallacy?
This is the base rate fallacy:
If presented with related base rate information (i.e. generic, general information) and specific information (information only pertaining to a certain case), the mind t
|
43,756
|
What's the name for this statistical fallacy?
|
Statistical inference becomes invalid when there is no variability -and in this case, the variability is non-existent. So the only way that the argument:
"50 people have been living in [area a] for the past two years and
there have been no incidents, therefore the area is safe for more
people to live there."
can be examined, is non-statistical, i.e. deterministic. Therefore the argument is methodologically valid (not factually correct) only if it is read as
"50 people have been living in [area a] for the past two years and
there have been no incidents, therefore the incident rate in the area is and will remain zero."
Wow. I am impressed with the confidence level of the person saying this.
Any implied inference of the type "if the rate is zero in the sample, we expect it to be "small/acceptable/"normal" in the population" (which is how one could understand the "it is safe to live there" assertion) is garbage, both because there is no base to extrapolate from sample to population, but also because there is no base to extrapolate from past/present to the future.
As Fisher would say, "get more data".
|
What's the name for this statistical fallacy?
|
Statistical inference becomes invalid when there is no variability -and in this case, the variability is non-existent. So the only way that the argument:
"50 people have been living in [area a] for
|
What's the name for this statistical fallacy?
Statistical inference becomes invalid when there is no variability -and in this case, the variability is non-existent. So the only way that the argument:
"50 people have been living in [area a] for the past two years and
there have been no incidents, therefore the area is safe for more
people to live there."
can be examined, is non-statistical, i.e. deterministic. Therefore the argument is methodologically valid (not factually correct) only if it is read as
"50 people have been living in [area a] for the past two years and
there have been no incidents, therefore the incident rate in the area is and will remain zero."
Wow. I am impressed with the confidence level of the person saying this.
Any implied inference of the type "if the rate is zero in the sample, we expect it to be "small/acceptable/"normal" in the population" (which is how one could understand the "it is safe to live there" assertion) is garbage, both because there is no base to extrapolate from sample to population, but also because there is no base to extrapolate from past/present to the future.
As Fisher would say, "get more data".
|
What's the name for this statistical fallacy?
Statistical inference becomes invalid when there is no variability -and in this case, the variability is non-existent. So the only way that the argument:
"50 people have been living in [area a] for
|
43,757
|
Binomial distribution for gender discrimination?
|
Assume that one is hiring from a large pool of equally qualified applicants of whom half are women and half are men. The number of women hired out of $n$ is $X.$ Suppose that $p$ is the probability that any one hire will be a women.
Perhaps you want to test
The null hypothesis $H_0: p = 1/2$ against $H_a: p < 1/2.$
For $n = 16, x = 2$ the P-value of this test is given in R as follows:
binom.test(2, 16, .5, alt="less")
Exact binomial test
data: 2 and 16
number of successes = 2, number of trials = 16, p-value = 0.00209
alternative hypothesis:
true probability of success is less than 0.5
95 percent confidence interval:
0.0000000 0.3438252
sample estimates:
probability of success
0.125
The P-value can also be found as follows:
pbinom(2, 16, .5)
[1] 0.002090454
Perhaps a more even-handed approach would
be to test $H_0: p= 1/2$ against $H_a: p\ne 1/2,$
perhaps allowing for the possibility that the
hiring process might be biased in either direction.
It turns out that the P-value of this 2-sided test
is twice the P-value of the 1-sided test.
binom.test(2, 16, .5)
Exact binomial test
data: 2 and 16
number of successes = 2, number of trials = 16, p-value = 0.004181
alternative hypothesis:
true probability of success is not equal to 0.5
95 percent confidence interval:
0.0155136 0.3834762
sample estimates:
probability of success
0.125
A major difficulty in interpreting results of these
tests arises in justifying the assumption that "a large pool of equally qualified applicants of whom half are women and half are men" was used--or is available. Without addressing such much more
difficult issues, counts of women hired may lead
to 'statistical significance', but not likely to persuasion. @whuber's Comment provides useful advice.
For data with 350 women hired out of 1150, the P-values of one- and two-sided tests are shown below.
Both of the P-values are very nearly $0,$
indicating that the observed $\hat p =X/n = 350/1150 = 0.304$ is inconsistent with $p = 1/2.$
binom.test(350, 1150, .5, alt="less")$p.val
[1] 2.388788e-41
binom.test(350, 1150, .5)$p.val
[1] 4.777577e-41
|
Binomial distribution for gender discrimination?
|
Assume that one is hiring from a large pool of equally qualified applicants of whom half are women and half are men. The number of women hired out of $n$ is $X.$ Suppose that $p$ is the probability th
|
Binomial distribution for gender discrimination?
Assume that one is hiring from a large pool of equally qualified applicants of whom half are women and half are men. The number of women hired out of $n$ is $X.$ Suppose that $p$ is the probability that any one hire will be a women.
Perhaps you want to test
The null hypothesis $H_0: p = 1/2$ against $H_a: p < 1/2.$
For $n = 16, x = 2$ the P-value of this test is given in R as follows:
binom.test(2, 16, .5, alt="less")
Exact binomial test
data: 2 and 16
number of successes = 2, number of trials = 16, p-value = 0.00209
alternative hypothesis:
true probability of success is less than 0.5
95 percent confidence interval:
0.0000000 0.3438252
sample estimates:
probability of success
0.125
The P-value can also be found as follows:
pbinom(2, 16, .5)
[1] 0.002090454
Perhaps a more even-handed approach would
be to test $H_0: p= 1/2$ against $H_a: p\ne 1/2,$
perhaps allowing for the possibility that the
hiring process might be biased in either direction.
It turns out that the P-value of this 2-sided test
is twice the P-value of the 1-sided test.
binom.test(2, 16, .5)
Exact binomial test
data: 2 and 16
number of successes = 2, number of trials = 16, p-value = 0.004181
alternative hypothesis:
true probability of success is not equal to 0.5
95 percent confidence interval:
0.0155136 0.3834762
sample estimates:
probability of success
0.125
A major difficulty in interpreting results of these
tests arises in justifying the assumption that "a large pool of equally qualified applicants of whom half are women and half are men" was used--or is available. Without addressing such much more
difficult issues, counts of women hired may lead
to 'statistical significance', but not likely to persuasion. @whuber's Comment provides useful advice.
For data with 350 women hired out of 1150, the P-values of one- and two-sided tests are shown below.
Both of the P-values are very nearly $0,$
indicating that the observed $\hat p =X/n = 350/1150 = 0.304$ is inconsistent with $p = 1/2.$
binom.test(350, 1150, .5, alt="less")$p.val
[1] 2.388788e-41
binom.test(350, 1150, .5)$p.val
[1] 4.777577e-41
|
Binomial distribution for gender discrimination?
Assume that one is hiring from a large pool of equally qualified applicants of whom half are women and half are men. The number of women hired out of $n$ is $X.$ Suppose that $p$ is the probability th
|
43,758
|
Binomial distribution for gender discrimination?
|
Bruce's answer is great. I'd like to provide another way of interrogating whether the results you've observed are reasonable. It's easy to look at a p-value and think it's "wrong" with respect to our intuitions about the observed data and our model.
It might help to reframe this by thinking about what data our model would generate under the null hypothesis. As whuber pointed out, gender bias in hiring is a complex topic, so I'm referring here to "number of heads", as in the number of coin flips that come up heads. However in principle the same issues would apply to any binomial model given appropriate assumptions are met.
First, let's simulate what number of heads we get if we flip 16 coins in a row, and repeat that simulation 10,000 times. What's the distribution of results, and where does 2 lie on that distribution?
a <- rbinom(10000, size = 16, prob = 0.5)
hist(a,
breaks = "FD",
xlab = "Number of heads",
main = "Histogram of number of heads when n=16, p=0.5"
)
abline(v = 2, lty = "dashed")
2 is present in our simulated data but at a pretty low frequency. Therefore .2% seems at least in the right ballpark. Bear in mind, we're only doing 10,000 replicates, so there will of course be error.
Now, let's simulate what number of heads we get when simulating 1150 flips, repeat that process 10,000 times, and visualise the distribution along with your observed value of 350:
b <- rbinom(10000, size = 1150, prob = 0.5)
hist(b,
breaks = "FD",
xlab = "Number of heads",
main = "Histogram of number of heads when n=1150, p=0.5"
)
abline(v = 350, lty = "dashed")
Huh. 350 isn't even visible on the distribution unless we manually adjust the x-axis!
## in fact 350 isn't visible unless we set xlim
hist(b, breaks = "FD",
xlab = "Number of heads", xlim = c(340, max(b) * 1.1),
main = "Histogram of number of heads when n=1150, p=0.5"
)
abline(v = 350, lty = "dashed")
This shows that for a binomial distribution with $p=0.5$ and $n=1150$, $x=350$ is a really weird result! Therefore an extremely small p-value isn't surprising. I think you would need in the range of 1e40 simulations to observe one value that extreme, in fact...
|
Binomial distribution for gender discrimination?
|
Bruce's answer is great. I'd like to provide another way of interrogating whether the results you've observed are reasonable. It's easy to look at a p-value and think it's "wrong" with respect to our
|
Binomial distribution for gender discrimination?
Bruce's answer is great. I'd like to provide another way of interrogating whether the results you've observed are reasonable. It's easy to look at a p-value and think it's "wrong" with respect to our intuitions about the observed data and our model.
It might help to reframe this by thinking about what data our model would generate under the null hypothesis. As whuber pointed out, gender bias in hiring is a complex topic, so I'm referring here to "number of heads", as in the number of coin flips that come up heads. However in principle the same issues would apply to any binomial model given appropriate assumptions are met.
First, let's simulate what number of heads we get if we flip 16 coins in a row, and repeat that simulation 10,000 times. What's the distribution of results, and where does 2 lie on that distribution?
a <- rbinom(10000, size = 16, prob = 0.5)
hist(a,
breaks = "FD",
xlab = "Number of heads",
main = "Histogram of number of heads when n=16, p=0.5"
)
abline(v = 2, lty = "dashed")
2 is present in our simulated data but at a pretty low frequency. Therefore .2% seems at least in the right ballpark. Bear in mind, we're only doing 10,000 replicates, so there will of course be error.
Now, let's simulate what number of heads we get when simulating 1150 flips, repeat that process 10,000 times, and visualise the distribution along with your observed value of 350:
b <- rbinom(10000, size = 1150, prob = 0.5)
hist(b,
breaks = "FD",
xlab = "Number of heads",
main = "Histogram of number of heads when n=1150, p=0.5"
)
abline(v = 350, lty = "dashed")
Huh. 350 isn't even visible on the distribution unless we manually adjust the x-axis!
## in fact 350 isn't visible unless we set xlim
hist(b, breaks = "FD",
xlab = "Number of heads", xlim = c(340, max(b) * 1.1),
main = "Histogram of number of heads when n=1150, p=0.5"
)
abline(v = 350, lty = "dashed")
This shows that for a binomial distribution with $p=0.5$ and $n=1150$, $x=350$ is a really weird result! Therefore an extremely small p-value isn't surprising. I think you would need in the range of 1e40 simulations to observe one value that extreme, in fact...
|
Binomial distribution for gender discrimination?
Bruce's answer is great. I'd like to provide another way of interrogating whether the results you've observed are reasonable. It's easy to look at a p-value and think it's "wrong" with respect to our
|
43,759
|
Binomial distribution for gender discrimination?
|
Before you get to the statistical mechanics this this type of test, you need to step back and make sure you remember the injunction that "correlation is not cause". Gender discrimination is one possible cause of non-equal hiring probabilities but there are many other possible causes, most commonly involving correlation between gender and relevant skills or qualifications for the position. Moreover, for the data in your question, we don't even have the number of applicants of each gender, so the probabilities we can estimate are not even conditional on applying for the position --- i.e., they are not "hiring probabilities" at all; they are joint probabilities of applying and then being hired. If males and females have unequal probabilities, that does not prove gender discrimination.
For this reason, it is best to do this type of analysis by first framing it in purely statistical terms where you are testing whether or not the probability of applying-and-being-hired is the same for a male or a female. For the data you have this would typically be done using a two-sided binomial test.$^\dagger$ Using the smaller dataset you can see from the test below that there is evidence of a non-equal joint probability for this event. (For the larger dataset the evidence for an unequal probability is much stronger).
#Perform test for equal probability
binom.test(2, 16, conf.level = 0.99, alt = "two.sided")
Exact binomial test
data: 2 and 16
number of successes = 2, number of trials = 16, p-value = 0.004181
alternative hypothesis: true probability of success is not equal to 0.5
99 percent confidence interval:
0.006658398 0.462758698
sample estimates:
probability of success
0.125
Now that you have established evidence of non-equal probabilies you can have a think about what, if any, causal inferences you can make. In particular, you will need to think about whether there is anything in the experimental setup that would allow you to reject other causal explanations for unequal probabilities (e.g., men more likely to apply, men more likely to have required skills for the position, etc.). Without more, it would be extremely dubious to use this statistical evidence to conclude that gender discrimination has occurred.
If you would like to read more about this topic, I recommend reading some studies on gender discrimination in hiring in labour economics. Studies on this topic typically either conduct randomised controlled trials (RCTs) using fake CVs with randomised sex assignment, or they use observational data and attempt to filter out confounding variables using regression methods. Another method is to look at skill and qualification metrics of people within the organisation, filtering for their organisational level and other covariates, and then see if there is any residual correlation between the skills/qualifications and gender; if there is, this can suggest gender discrimination against the group with higher residual skill values (i.e., these are higher because the discrimination causes a more strict filter for hiring/promotion for people in that group). This is quite a complicated field, and it involves much more than the kinds of gross statistical comparisons in output that are being compared here. It generally involves deeper thinking about relationships between cause and statistical association.
$^\dagger$ Some analysts will recommend a one-sided test, since you with to test the alternative that women have a lower probability of applying-and-being-hired. My view is that two-sided tests should be performed, so as not to bias the testing in favour of a hypothesis that might have been influenced by the data.
|
Binomial distribution for gender discrimination?
|
Before you get to the statistical mechanics this this type of test, you need to step back and make sure you remember the injunction that "correlation is not cause". Gender discrimination is one possi
|
Binomial distribution for gender discrimination?
Before you get to the statistical mechanics this this type of test, you need to step back and make sure you remember the injunction that "correlation is not cause". Gender discrimination is one possible cause of non-equal hiring probabilities but there are many other possible causes, most commonly involving correlation between gender and relevant skills or qualifications for the position. Moreover, for the data in your question, we don't even have the number of applicants of each gender, so the probabilities we can estimate are not even conditional on applying for the position --- i.e., they are not "hiring probabilities" at all; they are joint probabilities of applying and then being hired. If males and females have unequal probabilities, that does not prove gender discrimination.
For this reason, it is best to do this type of analysis by first framing it in purely statistical terms where you are testing whether or not the probability of applying-and-being-hired is the same for a male or a female. For the data you have this would typically be done using a two-sided binomial test.$^\dagger$ Using the smaller dataset you can see from the test below that there is evidence of a non-equal joint probability for this event. (For the larger dataset the evidence for an unequal probability is much stronger).
#Perform test for equal probability
binom.test(2, 16, conf.level = 0.99, alt = "two.sided")
Exact binomial test
data: 2 and 16
number of successes = 2, number of trials = 16, p-value = 0.004181
alternative hypothesis: true probability of success is not equal to 0.5
99 percent confidence interval:
0.006658398 0.462758698
sample estimates:
probability of success
0.125
Now that you have established evidence of non-equal probabilies you can have a think about what, if any, causal inferences you can make. In particular, you will need to think about whether there is anything in the experimental setup that would allow you to reject other causal explanations for unequal probabilities (e.g., men more likely to apply, men more likely to have required skills for the position, etc.). Without more, it would be extremely dubious to use this statistical evidence to conclude that gender discrimination has occurred.
If you would like to read more about this topic, I recommend reading some studies on gender discrimination in hiring in labour economics. Studies on this topic typically either conduct randomised controlled trials (RCTs) using fake CVs with randomised sex assignment, or they use observational data and attempt to filter out confounding variables using regression methods. Another method is to look at skill and qualification metrics of people within the organisation, filtering for their organisational level and other covariates, and then see if there is any residual correlation between the skills/qualifications and gender; if there is, this can suggest gender discrimination against the group with higher residual skill values (i.e., these are higher because the discrimination causes a more strict filter for hiring/promotion for people in that group). This is quite a complicated field, and it involves much more than the kinds of gross statistical comparisons in output that are being compared here. It generally involves deeper thinking about relationships between cause and statistical association.
$^\dagger$ Some analysts will recommend a one-sided test, since you with to test the alternative that women have a lower probability of applying-and-being-hired. My view is that two-sided tests should be performed, so as not to bias the testing in favour of a hypothesis that might have been influenced by the data.
|
Binomial distribution for gender discrimination?
Before you get to the statistical mechanics this this type of test, you need to step back and make sure you remember the injunction that "correlation is not cause". Gender discrimination is one possi
|
43,760
|
Binomial distribution for gender discrimination?
|
The results are consistent.
The differences in p-values that you get with trial size is as expected.
The dependency of the result on the parameter $n$ occurs because the distribution becomes more narrow.
The same relative deviation becomes less probable when $n$ increases.
See the below example (adapted from here) for the distribution of the observed number of women $k$ and the fraction of women $f$ as a function of the number of workers $n$.
Related question is How to estimate a probability of an event to occur based on its count?
Consistency
The fact that the same effect size (e.g ratio of women) becomes more significant is a good thing.
This relates to 'statistical consistency'*, and this is a desirable property. It means that we can make estimates better (as much as we want) by collecting larger samples.
So that is what you did with your sample of 1150, it is a more accurate estimate of the ratio of women than the sample of 16.
*An estimator is consistent if 'The probability for the estimator to differ by a certain quantity from the true value approaches zero, when we increase the sample size'.
Sidenote: Strictly speaking you only observed that the ratio of women is different from 0.5. But is this also discrimination?
Sidenote: This comparison of the 'deviation from the middle' is at the origin of p-values and the normal distribution. In 1710 similar comparisons were made by Arbuthnot comparing ratios in the birth of boys and girls. It is one of the first cases of expressing a p-value.
|
Binomial distribution for gender discrimination?
|
The results are consistent.
The differences in p-values that you get with trial size is as expected.
The dependency of the result on the parameter $n$ occurs because the distribution becomes more narr
|
Binomial distribution for gender discrimination?
The results are consistent.
The differences in p-values that you get with trial size is as expected.
The dependency of the result on the parameter $n$ occurs because the distribution becomes more narrow.
The same relative deviation becomes less probable when $n$ increases.
See the below example (adapted from here) for the distribution of the observed number of women $k$ and the fraction of women $f$ as a function of the number of workers $n$.
Related question is How to estimate a probability of an event to occur based on its count?
Consistency
The fact that the same effect size (e.g ratio of women) becomes more significant is a good thing.
This relates to 'statistical consistency'*, and this is a desirable property. It means that we can make estimates better (as much as we want) by collecting larger samples.
So that is what you did with your sample of 1150, it is a more accurate estimate of the ratio of women than the sample of 16.
*An estimator is consistent if 'The probability for the estimator to differ by a certain quantity from the true value approaches zero, when we increase the sample size'.
Sidenote: Strictly speaking you only observed that the ratio of women is different from 0.5. But is this also discrimination?
Sidenote: This comparison of the 'deviation from the middle' is at the origin of p-values and the normal distribution. In 1710 similar comparisons were made by Arbuthnot comparing ratios in the birth of boys and girls. It is one of the first cases of expressing a p-value.
|
Binomial distribution for gender discrimination?
The results are consistent.
The differences in p-values that you get with trial size is as expected.
The dependency of the result on the parameter $n$ occurs because the distribution becomes more narr
|
43,761
|
Binomial distribution for gender discrimination?
|
In basic hypothesis testing, we articulate a null hypothesis, choose an ordering of results, collect data, and then find the probability, given the null hypothesis, of getting results that are, according to the ordering we chose, as extreme or more extreme as the results that we found.
That's it. We find the probability of the results given the hypothesis. Nothing else.
We do not find the probability of the hypothesis given results. We do not find the probability of some hypothesis other than the null hypothesis.
In your case, the null hypothesis is that each hiring decision is a Bernoulli trial, each one is independent of the others, and the probability for each is 0.5. Your ordering is "more men is more extreme". The number 0.0021 you found is the probability of getting as many men or more, given those premises. It is not the probability of there being no gender discrimination. Not only are you confusing $P(E|H)$ and $P(H|E)$, there are many alternative hypotheses other than "there in gender discrimination". For instance, there could be fewer qualified female candidates, or the hirings could be not independent.
As for the effect of larger sample size, the number of standard deviations scales with the square root of the sample size. That is, in the examples you gave, the sample size was multiplied by 71.875, and square root of that is 8.48, so deviations from the expected mean of 0.50 represent 8.48 as many standard deviations.
|
Binomial distribution for gender discrimination?
|
In basic hypothesis testing, we articulate a null hypothesis, choose an ordering of results, collect data, and then find the probability, given the null hypothesis, of getting results that are, accord
|
Binomial distribution for gender discrimination?
In basic hypothesis testing, we articulate a null hypothesis, choose an ordering of results, collect data, and then find the probability, given the null hypothesis, of getting results that are, according to the ordering we chose, as extreme or more extreme as the results that we found.
That's it. We find the probability of the results given the hypothesis. Nothing else.
We do not find the probability of the hypothesis given results. We do not find the probability of some hypothesis other than the null hypothesis.
In your case, the null hypothesis is that each hiring decision is a Bernoulli trial, each one is independent of the others, and the probability for each is 0.5. Your ordering is "more men is more extreme". The number 0.0021 you found is the probability of getting as many men or more, given those premises. It is not the probability of there being no gender discrimination. Not only are you confusing $P(E|H)$ and $P(H|E)$, there are many alternative hypotheses other than "there in gender discrimination". For instance, there could be fewer qualified female candidates, or the hirings could be not independent.
As for the effect of larger sample size, the number of standard deviations scales with the square root of the sample size. That is, in the examples you gave, the sample size was multiplied by 71.875, and square root of that is 8.48, so deviations from the expected mean of 0.50 represent 8.48 as many standard deviations.
|
Binomial distribution for gender discrimination?
In basic hypothesis testing, we articulate a null hypothesis, choose an ordering of results, collect data, and then find the probability, given the null hypothesis, of getting results that are, accord
|
43,762
|
Regression vs. Classification: Is there a clear, generally accepted definition?
|
Classification denotes an action. It's what you do with the result of an analysis in which there is one or more outcome variables and one or more input (predictor; covariate) variables. If there is a single outcome variable, the discreteness of the variable does not matter. For example, binary logistic regression is for binary Y and is a direct (continuous) probability model that was not intended to be used for classification. The action of classification involves making choices and use of decision rules. In most cases it represents a premature decision made by an analyst who is not blessed with knowledge about the consequence of the decision (i.e., does not possess the utility/loss/cost function needed to make a good decision).
One can use any predictive method to do classification even if that was not the intent of the method. For example one can use arbitrary thresholds on predicted values to do classification from ordinary regression for continuous Y, or ordinal or binary regression for ordered or binary Y.
Many in machine learning think of classification as a good default mode; it is not, as detailed in my blog post. Among other things, classification hides close calls and lulls users into making decisions at the boundaries (e.g., when a predicted probability is 0.5001) when a better approach would be "get more data first".
Most of the time when you see classifier used in a sentence the correct term is prediction when the output is considered to be continuous.
|
Regression vs. Classification: Is there a clear, generally accepted definition?
|
Classification denotes an action. It's what you do with the result of an analysis in which there is one or more outcome variables and one or more input (predictor; covariate) variables. If there is
|
Regression vs. Classification: Is there a clear, generally accepted definition?
Classification denotes an action. It's what you do with the result of an analysis in which there is one or more outcome variables and one or more input (predictor; covariate) variables. If there is a single outcome variable, the discreteness of the variable does not matter. For example, binary logistic regression is for binary Y and is a direct (continuous) probability model that was not intended to be used for classification. The action of classification involves making choices and use of decision rules. In most cases it represents a premature decision made by an analyst who is not blessed with knowledge about the consequence of the decision (i.e., does not possess the utility/loss/cost function needed to make a good decision).
One can use any predictive method to do classification even if that was not the intent of the method. For example one can use arbitrary thresholds on predicted values to do classification from ordinary regression for continuous Y, or ordinal or binary regression for ordered or binary Y.
Many in machine learning think of classification as a good default mode; it is not, as detailed in my blog post. Among other things, classification hides close calls and lulls users into making decisions at the boundaries (e.g., when a predicted probability is 0.5001) when a better approach would be "get more data first".
Most of the time when you see classifier used in a sentence the correct term is prediction when the output is considered to be continuous.
|
Regression vs. Classification: Is there a clear, generally accepted definition?
Classification denotes an action. It's what you do with the result of an analysis in which there is one or more outcome variables and one or more input (predictor; covariate) variables. If there is
|
43,763
|
Regression vs. Classification: Is there a clear, generally accepted definition?
|
No, I don't think that definition is generally accepted. I would not regard Poisson regression as classification as the thing you are generally interested is the conditional values of a Poisson distribution that describes the distribution of the target variable for those values of the attributes. Those parameters are generally continuous. You might then use that to work out the most likely count, but that would be discretising the predictive distribution given by the model.
Likewise some here (e.g. Frank Harrell - see his answer to this question +1) view logistic regression purely as a probabilistic model, used to estimate a conditional probability, and not as a classification model (which is what you get by applying a threshold and discretising the continuous output of the model). I have a lot of sympathy with this view, except that in practical applications where you need to perform that discretisation, that still impacts on the design and evaluation of the model and shouldn't be ignored. The optimal classification is not always obtained by estimating the probability of class membership and thresholding, sometimes it is better to classify the data directly. If that were not the case, [kernel] logistic regression would not perform worse than the Support Vector Machine, but on some applications it clearly does.
I'd probably say that a classifier is a problem where the target distribution is categorical, and the aim to to place each object into a category.
|
Regression vs. Classification: Is there a clear, generally accepted definition?
|
No, I don't think that definition is generally accepted. I would not regard Poisson regression as classification as the thing you are generally interested is the conditional values of a Poisson distr
|
Regression vs. Classification: Is there a clear, generally accepted definition?
No, I don't think that definition is generally accepted. I would not regard Poisson regression as classification as the thing you are generally interested is the conditional values of a Poisson distribution that describes the distribution of the target variable for those values of the attributes. Those parameters are generally continuous. You might then use that to work out the most likely count, but that would be discretising the predictive distribution given by the model.
Likewise some here (e.g. Frank Harrell - see his answer to this question +1) view logistic regression purely as a probabilistic model, used to estimate a conditional probability, and not as a classification model (which is what you get by applying a threshold and discretising the continuous output of the model). I have a lot of sympathy with this view, except that in practical applications where you need to perform that discretisation, that still impacts on the design and evaluation of the model and shouldn't be ignored. The optimal classification is not always obtained by estimating the probability of class membership and thresholding, sometimes it is better to classify the data directly. If that were not the case, [kernel] logistic regression would not perform worse than the Support Vector Machine, but on some applications it clearly does.
I'd probably say that a classifier is a problem where the target distribution is categorical, and the aim to to place each object into a category.
|
Regression vs. Classification: Is there a clear, generally accepted definition?
No, I don't think that definition is generally accepted. I would not regard Poisson regression as classification as the thing you are generally interested is the conditional values of a Poisson distr
|
43,764
|
Regression vs. Classification: Is there a clear, generally accepted definition?
|
A reasonable standard definition of classification would be that the $Y$ value is of nominal scale level, i.e., that order and numerical differences are not meaningful (or at least not of interest). Models with count or ordinal responses are widely referred to as regression, e.g., Poisson regression, ordinal regression.
Note that the comment by Dikran Marsupial is correct that some models with nominal scaled outcome are also referred to as regression ((multinomial) logistic regression). My interpretation of this would be that the term regression is also used to refer to a class of models that grew out of historically quantitative regression models. I think it makes still sense (and would probably be standard handling of the term) to also refer to these as classification methods, and certainly to the problems solved by them as classification problems. This handling of terms would have regression and classification as not necessarily mutually exclusive. Probably regression is more ambiguous than classification, as it can be used for methods for quantitative or at least ordinal responses (and insofar be distinct from classification), but also for certain model classes that may also have versions for classification problems.
|
Regression vs. Classification: Is there a clear, generally accepted definition?
|
A reasonable standard definition of classification would be that the $Y$ value is of nominal scale level, i.e., that order and numerical differences are not meaningful (or at least not of interest). M
|
Regression vs. Classification: Is there a clear, generally accepted definition?
A reasonable standard definition of classification would be that the $Y$ value is of nominal scale level, i.e., that order and numerical differences are not meaningful (or at least not of interest). Models with count or ordinal responses are widely referred to as regression, e.g., Poisson regression, ordinal regression.
Note that the comment by Dikran Marsupial is correct that some models with nominal scaled outcome are also referred to as regression ((multinomial) logistic regression). My interpretation of this would be that the term regression is also used to refer to a class of models that grew out of historically quantitative regression models. I think it makes still sense (and would probably be standard handling of the term) to also refer to these as classification methods, and certainly to the problems solved by them as classification problems. This handling of terms would have regression and classification as not necessarily mutually exclusive. Probably regression is more ambiguous than classification, as it can be used for methods for quantitative or at least ordinal responses (and insofar be distinct from classification), but also for certain model classes that may also have versions for classification problems.
|
Regression vs. Classification: Is there a clear, generally accepted definition?
A reasonable standard definition of classification would be that the $Y$ value is of nominal scale level, i.e., that order and numerical differences are not meaningful (or at least not of interest). M
|
43,765
|
Regression vs. Classification: Is there a clear, generally accepted definition?
|
To muddy the waters further, classification can mean
trying to find distinct classes in a dataset from scratch, which has attracted many different names, including mathematical or numerical taxonomy, but cluster analysis seems the most durable and popular
assigning observations to classes already defined, which has other names too including identification and discrimination.
|
Regression vs. Classification: Is there a clear, generally accepted definition?
|
To muddy the waters further, classification can mean
trying to find distinct classes in a dataset from scratch, which has attracted many different names, including mathematical or numerical taxonomy,
|
Regression vs. Classification: Is there a clear, generally accepted definition?
To muddy the waters further, classification can mean
trying to find distinct classes in a dataset from scratch, which has attracted many different names, including mathematical or numerical taxonomy, but cluster analysis seems the most durable and popular
assigning observations to classes already defined, which has other names too including identification and discrimination.
|
Regression vs. Classification: Is there a clear, generally accepted definition?
To muddy the waters further, classification can mean
trying to find distinct classes in a dataset from scratch, which has attracted many different names, including mathematical or numerical taxonomy,
|
43,766
|
Regression vs. Classification: Is there a clear, generally accepted definition?
|
Definitions are overrated. They are just words which someone claims are synonymous to other words. They may be useful in special situations, e.g. to help a novice get a grasp of a concept, or to ensure that experts, when communicating with each other, know precisely what they are talking about. But, standing alone, who cares?
That said, I believe all machine learners and a good deal of statisticians wouldn't object and would understand what you mean if you say "classification" for a task where your dependent variable is nominal (synonym: categorical) in Stevens' typology. Most machine learners will associate regression with numerical dependent variables, but some statisticians would say that "everything is regression", and classification a step---obviously outside of "everything"---you apply after performing some kind of regression (e.g. logistic regression) for the purpose of decision-making.
For dependent variables which don't fit these two categories, the things get murky. Ordinal regression lies somewhere between classical (numerical) regression and classification. Predicting counts is, in my opinion, clearly a regression (Poisson, binomial etc.), and not classification.
|
Regression vs. Classification: Is there a clear, generally accepted definition?
|
Definitions are overrated. They are just words which someone claims are synonymous to other words. They may be useful in special situations, e.g. to help a novice get a grasp of a concept, or to ensur
|
Regression vs. Classification: Is there a clear, generally accepted definition?
Definitions are overrated. They are just words which someone claims are synonymous to other words. They may be useful in special situations, e.g. to help a novice get a grasp of a concept, or to ensure that experts, when communicating with each other, know precisely what they are talking about. But, standing alone, who cares?
That said, I believe all machine learners and a good deal of statisticians wouldn't object and would understand what you mean if you say "classification" for a task where your dependent variable is nominal (synonym: categorical) in Stevens' typology. Most machine learners will associate regression with numerical dependent variables, but some statisticians would say that "everything is regression", and classification a step---obviously outside of "everything"---you apply after performing some kind of regression (e.g. logistic regression) for the purpose of decision-making.
For dependent variables which don't fit these two categories, the things get murky. Ordinal regression lies somewhere between classical (numerical) regression and classification. Predicting counts is, in my opinion, clearly a regression (Poisson, binomial etc.), and not classification.
|
Regression vs. Classification: Is there a clear, generally accepted definition?
Definitions are overrated. They are just words which someone claims are synonymous to other words. They may be useful in special situations, e.g. to help a novice get a grasp of a concept, or to ensur
|
43,767
|
Regression vs. Classification: Is there a clear, generally accepted definition?
|
You need to search more about these terms. Resources may contain 'Linear Algebra', 'Signal & Control', 'Data Mining', 'Predictive Models',... vice versa. I explain some of them briefly here:
Interpolation: Some times we need to predict value of some data points based on another ones, that is generalizing the order we found on some observations (sampled data points) , to another one. Observed data points might be sampled points. We describe this order as mathematical functions (named basis function). This function may be a linear function; in this case we call it Linear Regression. If interpolation is based on current observed values, and aims to predict upcoming observations (assumes that current trend of data points continues on future) we call the method 'Extrapolation'.
Regression: Is the process of finding the best values for parameters of a regression function (for example parameters of a line) in-order to fir into data points. Regression about doesn't have any scenes about trend, it just tries to optimize the parameters of a linear function and find their best values, which fit best to data points. A polynomial regression tries to fit the best polynomial function to data points.
Classification: Some times you want to assign a category to data points. Classes are finite and are pre-known. It is like a process of mapping data points from a infinite space, into some points in a finite space. In Regression, you was trying to search for best values for a basis functions parameters, but in classification you are trying to find best values for a Mapping function. A mapping function could also be a line, a polynomial, or each function which was applicable in interpolation (and regression). The only difference is the way we use it. We use mapping function for separating data points from each other, while use basis functions in regression for finding out the order which describes them the best. Neural Networks (which are used vastly in classifications) contain several mapping matrices which maps input data described in finite properties to output finite classes.
Prediction: Could be prediction value of future data points or their class. That is a general term which can contain both Regression, and Classification. Predication can employ any mathematical approach with the assumption that the current order of events, will continue in future, or any changes will follow an order which could be known or estimated.
Modeling: Is another general term (more general one) which is the way we describe a system by a mathematical (or any thing) abstract model. The output of this process is a tool for predicting, interpolation, describing, and analyzing a system. Regression is a kind of modeling which describes the system as a linear function and could be used for prediction and describing.
|
Regression vs. Classification: Is there a clear, generally accepted definition?
|
You need to search more about these terms. Resources may contain 'Linear Algebra', 'Signal & Control', 'Data Mining', 'Predictive Models',... vice versa. I explain some of them briefly here:
Interpola
|
Regression vs. Classification: Is there a clear, generally accepted definition?
You need to search more about these terms. Resources may contain 'Linear Algebra', 'Signal & Control', 'Data Mining', 'Predictive Models',... vice versa. I explain some of them briefly here:
Interpolation: Some times we need to predict value of some data points based on another ones, that is generalizing the order we found on some observations (sampled data points) , to another one. Observed data points might be sampled points. We describe this order as mathematical functions (named basis function). This function may be a linear function; in this case we call it Linear Regression. If interpolation is based on current observed values, and aims to predict upcoming observations (assumes that current trend of data points continues on future) we call the method 'Extrapolation'.
Regression: Is the process of finding the best values for parameters of a regression function (for example parameters of a line) in-order to fir into data points. Regression about doesn't have any scenes about trend, it just tries to optimize the parameters of a linear function and find their best values, which fit best to data points. A polynomial regression tries to fit the best polynomial function to data points.
Classification: Some times you want to assign a category to data points. Classes are finite and are pre-known. It is like a process of mapping data points from a infinite space, into some points in a finite space. In Regression, you was trying to search for best values for a basis functions parameters, but in classification you are trying to find best values for a Mapping function. A mapping function could also be a line, a polynomial, or each function which was applicable in interpolation (and regression). The only difference is the way we use it. We use mapping function for separating data points from each other, while use basis functions in regression for finding out the order which describes them the best. Neural Networks (which are used vastly in classifications) contain several mapping matrices which maps input data described in finite properties to output finite classes.
Prediction: Could be prediction value of future data points or their class. That is a general term which can contain both Regression, and Classification. Predication can employ any mathematical approach with the assumption that the current order of events, will continue in future, or any changes will follow an order which could be known or estimated.
Modeling: Is another general term (more general one) which is the way we describe a system by a mathematical (or any thing) abstract model. The output of this process is a tool for predicting, interpolation, describing, and analyzing a system. Regression is a kind of modeling which describes the system as a linear function and could be used for prediction and describing.
|
Regression vs. Classification: Is there a clear, generally accepted definition?
You need to search more about these terms. Resources may contain 'Linear Algebra', 'Signal & Control', 'Data Mining', 'Predictive Models',... vice versa. I explain some of them briefly here:
Interpola
|
43,768
|
Regression vs. Classification: Is there a clear, generally accepted definition?
|
I think people are overcomplicating this. Simply put, in classification problems the target variable is nominal (eg "dog" vs "cat"), whereas in regression problems the target is numeric.
|
Regression vs. Classification: Is there a clear, generally accepted definition?
|
I think people are overcomplicating this. Simply put, in classification problems the target variable is nominal (eg "dog" vs "cat"), whereas in regression problems the target is numeric.
|
Regression vs. Classification: Is there a clear, generally accepted definition?
I think people are overcomplicating this. Simply put, in classification problems the target variable is nominal (eg "dog" vs "cat"), whereas in regression problems the target is numeric.
|
Regression vs. Classification: Is there a clear, generally accepted definition?
I think people are overcomplicating this. Simply put, in classification problems the target variable is nominal (eg "dog" vs "cat"), whereas in regression problems the target is numeric.
|
43,769
|
If dropout is going to remove neurons, why are those neurons built?
|
To add to @frank's answer, the reason using dropout is not the same as training a smaller network is that the neurons that are dropped out are randomly selected each time the weights are updated. So while on each iteration only some of the neurons are used and updated, over the entire training cycle all the neurons are trained. According to Jason Brownlee's A Gentle Introduction to Dropout for Regularizing Deep Neural Networks, dropout can be thought of as training an ensemble of models in parallel.
|
If dropout is going to remove neurons, why are those neurons built?
|
To add to @frank's answer, the reason using dropout is not the same as training a smaller network is that the neurons that are dropped out are randomly selected each time the weights are updated. So w
|
If dropout is going to remove neurons, why are those neurons built?
To add to @frank's answer, the reason using dropout is not the same as training a smaller network is that the neurons that are dropped out are randomly selected each time the weights are updated. So while on each iteration only some of the neurons are used and updated, over the entire training cycle all the neurons are trained. According to Jason Brownlee's A Gentle Introduction to Dropout for Regularizing Deep Neural Networks, dropout can be thought of as training an ensemble of models in parallel.
|
If dropout is going to remove neurons, why are those neurons built?
To add to @frank's answer, the reason using dropout is not the same as training a smaller network is that the neurons that are dropped out are randomly selected each time the weights are updated. So w
|
43,770
|
If dropout is going to remove neurons, why are those neurons built?
|
The neurons are only dropped temporarily during training. They are not dropped from the network altogether. It is just that it turns out that we get better weights if we randomly set them to zero, temporarily, so the other neurons "think" they cannot "rely" on the other neurons and have to "perform well themselves". The neural network that you get out at the end contains all the neurons.
|
If dropout is going to remove neurons, why are those neurons built?
|
The neurons are only dropped temporarily during training. They are not dropped from the network altogether. It is just that it turns out that we get better weights if we randomly set them to zero, tem
|
If dropout is going to remove neurons, why are those neurons built?
The neurons are only dropped temporarily during training. They are not dropped from the network altogether. It is just that it turns out that we get better weights if we randomly set them to zero, temporarily, so the other neurons "think" they cannot "rely" on the other neurons and have to "perform well themselves". The neural network that you get out at the end contains all the neurons.
|
If dropout is going to remove neurons, why are those neurons built?
The neurons are only dropped temporarily during training. They are not dropped from the network altogether. It is just that it turns out that we get better weights if we randomly set them to zero, tem
|
43,771
|
If dropout is going to remove neurons, why are those neurons built?
|
The goal of dropout isn't to disable neurons permanently. It is to prevent the network from splitting into separate sections functioning in parallel and not utilizing interconnections between them. An extreme, undesired case would be a network relying on only a single neuron processing certain feature.
Dropout disables neurons randomly during training which forces the consecutive layer to optimize weights coming from other inputs, and thus making a better use of all the possible connections available in the architecture.
|
If dropout is going to remove neurons, why are those neurons built?
|
The goal of dropout isn't to disable neurons permanently. It is to prevent the network from splitting into separate sections functioning in parallel and not utilizing interconnections between them. An
|
If dropout is going to remove neurons, why are those neurons built?
The goal of dropout isn't to disable neurons permanently. It is to prevent the network from splitting into separate sections functioning in parallel and not utilizing interconnections between them. An extreme, undesired case would be a network relying on only a single neuron processing certain feature.
Dropout disables neurons randomly during training which forces the consecutive layer to optimize weights coming from other inputs, and thus making a better use of all the possible connections available in the architecture.
|
If dropout is going to remove neurons, why are those neurons built?
The goal of dropout isn't to disable neurons permanently. It is to prevent the network from splitting into separate sections functioning in parallel and not utilizing interconnections between them. An
|
43,772
|
Is it a valid algorithm to win at the casino roulette?
|
You have discovered the Martingale. It is a perfectly reasonable betting strategy, which was played by Casanova and also by Charles Wells, but unfortunately it doesn't win in the long run. Essentially the strategy is no different from the following idea:
Keep betting. Each time you lose, bet more than your total losses up to now. Since you know that you'll eventually win, you will always end up on top.
Your plan of only betting after getting three the same in a row is a red herring, because spins are independent. It makes no difference if there have already been three in a row. After all, how could it make a difference? If it did, this would imply that the roulette wheel magically possessed some kind of memory, which it doesn't.
There are various explanations for why the strategy doesn't work, among which are: you don't have an infinite amount of money to bet with, the bank doesn't have an infinite amount of money, and you can't play for an infinite amount of time. It's the third of these that is the real problem. Since each bet in roulette has a negative expected value, no matter what you do, you expect to end up with a negative amount of money after any finite number of bets. You can only win if there is no upper limit to the amount of bets you can ever make.
For your last question, the probability of getting an odd number on a real roulette wheel is actually less than $0.5$, because of a 00 on the wheel. But this doesn't change the fact that you have discovered a nice winning strategy; it's just that your strategy can't win (on average) in any finite amount of bets.
|
Is it a valid algorithm to win at the casino roulette?
|
You have discovered the Martingale. It is a perfectly reasonable betting strategy, which was played by Casanova and also by Charles Wells, but unfortunately it doesn't win in the long run. Essentially
|
Is it a valid algorithm to win at the casino roulette?
You have discovered the Martingale. It is a perfectly reasonable betting strategy, which was played by Casanova and also by Charles Wells, but unfortunately it doesn't win in the long run. Essentially the strategy is no different from the following idea:
Keep betting. Each time you lose, bet more than your total losses up to now. Since you know that you'll eventually win, you will always end up on top.
Your plan of only betting after getting three the same in a row is a red herring, because spins are independent. It makes no difference if there have already been three in a row. After all, how could it make a difference? If it did, this would imply that the roulette wheel magically possessed some kind of memory, which it doesn't.
There are various explanations for why the strategy doesn't work, among which are: you don't have an infinite amount of money to bet with, the bank doesn't have an infinite amount of money, and you can't play for an infinite amount of time. It's the third of these that is the real problem. Since each bet in roulette has a negative expected value, no matter what you do, you expect to end up with a negative amount of money after any finite number of bets. You can only win if there is no upper limit to the amount of bets you can ever make.
For your last question, the probability of getting an odd number on a real roulette wheel is actually less than $0.5$, because of a 00 on the wheel. But this doesn't change the fact that you have discovered a nice winning strategy; it's just that your strategy can't win (on average) in any finite amount of bets.
|
Is it a valid algorithm to win at the casino roulette?
You have discovered the Martingale. It is a perfectly reasonable betting strategy, which was played by Casanova and also by Charles Wells, but unfortunately it doesn't win in the long run. Essentially
|
43,773
|
Is it a valid algorithm to win at the casino roulette?
|
You missed the fact that your calculation refers to the prior probability of four same-parity numbers in a row, whereas at the moment when you place your bet, you have already observed three of the numbers, hence the probability you are betting on is either the conditional probability of an odd number given that the three previous numbers were odd or the conditional probability of an even number given that the three previous numbers were even. If you compute that conditional probability correctly, you should find that it is equal to the prior probability that any given spin of the wheel will come up odd (and also equal to the probability that it will come up even).
The rest of your system appears to consist of a double-or-nothing strategy. If you start with a large enough pile of money (for example, $10^8$ times your initial bet, as shown in your Python code), and you play not too many games (only 3000 in your example), the chances are quite good that this strategy will "work". But if you are very unlucky, or if you play long enough, you will hit such a bad streak of losses that you will not have enough money left to double your bet after the last loss, and the strategy fails. In effect, you are risking the loss of 5 to 10 billion units of money in return for a non-quite-certain chance to win 300,000 units of money.
At only 3000 games in each run of your simulation, it may take quite a few runs before you encounter a disastrous outcome, so after a limited number of simulations it may appear to you that this system works well. But that would only be because you haven't done enough trials to correctly discover the risk.
|
Is it a valid algorithm to win at the casino roulette?
|
You missed the fact that your calculation refers to the prior probability of four same-parity numbers in a row, whereas at the moment when you place your bet, you have already observed three of the nu
|
Is it a valid algorithm to win at the casino roulette?
You missed the fact that your calculation refers to the prior probability of four same-parity numbers in a row, whereas at the moment when you place your bet, you have already observed three of the numbers, hence the probability you are betting on is either the conditional probability of an odd number given that the three previous numbers were odd or the conditional probability of an even number given that the three previous numbers were even. If you compute that conditional probability correctly, you should find that it is equal to the prior probability that any given spin of the wheel will come up odd (and also equal to the probability that it will come up even).
The rest of your system appears to consist of a double-or-nothing strategy. If you start with a large enough pile of money (for example, $10^8$ times your initial bet, as shown in your Python code), and you play not too many games (only 3000 in your example), the chances are quite good that this strategy will "work". But if you are very unlucky, or if you play long enough, you will hit such a bad streak of losses that you will not have enough money left to double your bet after the last loss, and the strategy fails. In effect, you are risking the loss of 5 to 10 billion units of money in return for a non-quite-certain chance to win 300,000 units of money.
At only 3000 games in each run of your simulation, it may take quite a few runs before you encounter a disastrous outcome, so after a limited number of simulations it may appear to you that this system works well. But that would only be because you haven't done enough trials to correctly discover the risk.
|
Is it a valid algorithm to win at the casino roulette?
You missed the fact that your calculation refers to the prior probability of four same-parity numbers in a row, whereas at the moment when you place your bet, you have already observed three of the nu
|
43,774
|
Is it a valid algorithm to win at the casino roulette?
|
Looks like everyone already told you this--
But, surprisingly enough, each bet in Roulette has the exact same odds to payout ratio, or expected value (EV).
That EV is negative (house edge). So red, black, columns, numbers -- all the same expected return, with the exception of the "sucker's bet" pentagon, which has slightly worse EV than any other bet.
Your system is a combination of believing the roulette wheel has a memory (the 'hot' and 'icy' numbers graphics in Roulette wheels in Vegas are meant to entice suckers with 'systems' that don't work). It doesn't.
You also throw in the Martingale system -- which goes like this. Make a bet -- if you lose, make a larger bet that covers all your losses. Play until you win one time.
The problem with this is that, given you have finite money, and the house has a max bet limit (it does) --- you WILL, at some point, accomplish the unlikely but inevitable feat of losing 8 or 9 times in a row (going from one bet to the max bet) -- and losing a metric S$@! ton of money.
Ultimately, the house has about a 5% edge in Roulette. That means long term, you will average a 95% return on every bet placed on the wheel.
So a bet of 1000 in the long term average out to 50 lost per bet.
The more bets you make, the more statistically certain this is.
So any system, like the Martingale, that throws increasingly larger sums on the table, averages out to lose increasingly higher amounts overall.
|
Is it a valid algorithm to win at the casino roulette?
|
Looks like everyone already told you this--
But, surprisingly enough, each bet in Roulette has the exact same odds to payout ratio, or expected value (EV).
That EV is negative (house edge). So red, bl
|
Is it a valid algorithm to win at the casino roulette?
Looks like everyone already told you this--
But, surprisingly enough, each bet in Roulette has the exact same odds to payout ratio, or expected value (EV).
That EV is negative (house edge). So red, black, columns, numbers -- all the same expected return, with the exception of the "sucker's bet" pentagon, which has slightly worse EV than any other bet.
Your system is a combination of believing the roulette wheel has a memory (the 'hot' and 'icy' numbers graphics in Roulette wheels in Vegas are meant to entice suckers with 'systems' that don't work). It doesn't.
You also throw in the Martingale system -- which goes like this. Make a bet -- if you lose, make a larger bet that covers all your losses. Play until you win one time.
The problem with this is that, given you have finite money, and the house has a max bet limit (it does) --- you WILL, at some point, accomplish the unlikely but inevitable feat of losing 8 or 9 times in a row (going from one bet to the max bet) -- and losing a metric S$@! ton of money.
Ultimately, the house has about a 5% edge in Roulette. That means long term, you will average a 95% return on every bet placed on the wheel.
So a bet of 1000 in the long term average out to 50 lost per bet.
The more bets you make, the more statistically certain this is.
So any system, like the Martingale, that throws increasingly larger sums on the table, averages out to lose increasingly higher amounts overall.
|
Is it a valid algorithm to win at the casino roulette?
Looks like everyone already told you this--
But, surprisingly enough, each bet in Roulette has the exact same odds to payout ratio, or expected value (EV).
That EV is negative (house edge). So red, bl
|
43,775
|
Is it a valid algorithm to win at the casino roulette?
|
My level is too low to comment BUT I can post this answer so here it goes.
I see all of you spamming about finite bets and finite money. However, if we do the maths regarding ONLINE roulettes. I came to the following conclusion.
If you have a starting budget of 20000, the actual chance of losing is very small (not impossible though, but I guess that impossible doesn't exist in statistics).
Here's why:
All rolls are completely independent of eachother. The example i'm using has 15 numbers, 7 red, 7 black, 1 green. This effectively means that you have around 46% chance of winning if you bet on red or green.
Now follow me into some maths. The chance to lose this throw and the next is those two chances multiplied (basic). Your chance to lose is 0.54, so your chance to lose twice in a row is 29%. Now if you keep going like this, let's look at the possibility you'll lose 10 times in a row. this effectively means 0.54^10. We see that this chance is only 0.2%. If the minimum bet is 1, that means (using Martingale of course) you need a minimum of 1023 to be able to bet 10 times on the same color, doubling your bet.
If you take it even further (saying 13 times not your color in a row), you have 0.03% chance it actually happens and that's something I think we can call statistically negligeable. So that kinda almost solves the finite money stuff.
Regarding the finite time, some sites offer you an autobet feature. I recommend using that. And for god sakes, don't turn that autobet off when you lose some rounds. Chances are that next round is your round.
(I know that 0.03% is still a chance to lose. But as you win and earn more money, you'll be able to take on longer 'trains' and eventually this chance will go to its 0 limit.)
Just keep in mind, the house always wins.
Small sidenote: i'm only talking about online roulettes and I've only played one so far. So the possiblities of me being wrong are pretty big. Just please correct me if i'm wrong.
EDIT:
As commented, there were no real equations although i'm talking about maths. So I'll explain quickly (without too much depth) how I reached certain numbers.
You have 46% of winning, this is because you have 7/15 chance to win (because all numbers are equally distributed). So 7/15 ≈ 0.46, which means 46%.
As I said, the chance of losing two rounds in a row is basic Maths. Knowing the fact that two rounds are completely independent of each other, we can just multiply the odds and see the possible chance to lose. (Note that the chance to lose 1 round is ca. 54%). This effectively means 0.54*0.54=29.16%.
Going even further, the chance you lose 10 rounds in a row, would be:
0.54*0.54*0.54*0.54*0.54*0.54*0.54*0.54*0.54*0.54=0.54^10=0.00210 or 0.21%.
And of course, the further you go, the less chance you have. Taking the 13 rounds example: 0.54^13=0.0003319 or 0.033% chance you'll lose.
But keep in mind that you'll have to use the martingale system of course, otherwise you'll lose. This means you will need a large enough starting balance, to be able to avoid those nasty trains.
|
Is it a valid algorithm to win at the casino roulette?
|
My level is too low to comment BUT I can post this answer so here it goes.
I see all of you spamming about finite bets and finite money. However, if we do the maths regarding ONLINE roulettes. I came
|
Is it a valid algorithm to win at the casino roulette?
My level is too low to comment BUT I can post this answer so here it goes.
I see all of you spamming about finite bets and finite money. However, if we do the maths regarding ONLINE roulettes. I came to the following conclusion.
If you have a starting budget of 20000, the actual chance of losing is very small (not impossible though, but I guess that impossible doesn't exist in statistics).
Here's why:
All rolls are completely independent of eachother. The example i'm using has 15 numbers, 7 red, 7 black, 1 green. This effectively means that you have around 46% chance of winning if you bet on red or green.
Now follow me into some maths. The chance to lose this throw and the next is those two chances multiplied (basic). Your chance to lose is 0.54, so your chance to lose twice in a row is 29%. Now if you keep going like this, let's look at the possibility you'll lose 10 times in a row. this effectively means 0.54^10. We see that this chance is only 0.2%. If the minimum bet is 1, that means (using Martingale of course) you need a minimum of 1023 to be able to bet 10 times on the same color, doubling your bet.
If you take it even further (saying 13 times not your color in a row), you have 0.03% chance it actually happens and that's something I think we can call statistically negligeable. So that kinda almost solves the finite money stuff.
Regarding the finite time, some sites offer you an autobet feature. I recommend using that. And for god sakes, don't turn that autobet off when you lose some rounds. Chances are that next round is your round.
(I know that 0.03% is still a chance to lose. But as you win and earn more money, you'll be able to take on longer 'trains' and eventually this chance will go to its 0 limit.)
Just keep in mind, the house always wins.
Small sidenote: i'm only talking about online roulettes and I've only played one so far. So the possiblities of me being wrong are pretty big. Just please correct me if i'm wrong.
EDIT:
As commented, there were no real equations although i'm talking about maths. So I'll explain quickly (without too much depth) how I reached certain numbers.
You have 46% of winning, this is because you have 7/15 chance to win (because all numbers are equally distributed). So 7/15 ≈ 0.46, which means 46%.
As I said, the chance of losing two rounds in a row is basic Maths. Knowing the fact that two rounds are completely independent of each other, we can just multiply the odds and see the possible chance to lose. (Note that the chance to lose 1 round is ca. 54%). This effectively means 0.54*0.54=29.16%.
Going even further, the chance you lose 10 rounds in a row, would be:
0.54*0.54*0.54*0.54*0.54*0.54*0.54*0.54*0.54*0.54=0.54^10=0.00210 or 0.21%.
And of course, the further you go, the less chance you have. Taking the 13 rounds example: 0.54^13=0.0003319 or 0.033% chance you'll lose.
But keep in mind that you'll have to use the martingale system of course, otherwise you'll lose. This means you will need a large enough starting balance, to be able to avoid those nasty trains.
|
Is it a valid algorithm to win at the casino roulette?
My level is too low to comment BUT I can post this answer so here it goes.
I see all of you spamming about finite bets and finite money. However, if we do the maths regarding ONLINE roulettes. I came
|
43,776
|
In math/stats terminology, $1/p$ is the reciprocal of $p$. So what is $1-p$ called, if anything?
|
Assuming $p$ is the probability of an event, $1 - p$ is the probability of its complement.
If $p$ is not the probability of an event then I doubt that $1 - p$ has any special meaning or name.
|
In math/stats terminology, $1/p$ is the reciprocal of $p$. So what is $1-p$ called, if anything?
|
Assuming $p$ is the probability of an event, $1 - p$ is the probability of its complement.
If $p$ is not the probability of an event then I doubt that $1 - p$ has any special meaning or name.
|
In math/stats terminology, $1/p$ is the reciprocal of $p$. So what is $1-p$ called, if anything?
Assuming $p$ is the probability of an event, $1 - p$ is the probability of its complement.
If $p$ is not the probability of an event then I doubt that $1 - p$ has any special meaning or name.
|
In math/stats terminology, $1/p$ is the reciprocal of $p$. So what is $1-p$ called, if anything?
Assuming $p$ is the probability of an event, $1 - p$ is the probability of its complement.
If $p$ is not the probability of an event then I doubt that $1 - p$ has any special meaning or name.
|
43,777
|
In math/stats terminology, $1/p$ is the reciprocal of $p$. So what is $1-p$ called, if anything?
|
In addition to $1-p$ being the complement where $p$ is a probability.
There is also the general process of taking $1 - x$ or $0 - x$ or $c - x$ where $x$ is a variable and $c$ is a constant. This is sometimes referred to as reversing or reflecting a variable.
|
In math/stats terminology, $1/p$ is the reciprocal of $p$. So what is $1-p$ called, if anything?
|
In addition to $1-p$ being the complement where $p$ is a probability.
There is also the general process of taking $1 - x$ or $0 - x$ or $c - x$ where $x$ is a variable and $c$ is a constant. This is
|
In math/stats terminology, $1/p$ is the reciprocal of $p$. So what is $1-p$ called, if anything?
In addition to $1-p$ being the complement where $p$ is a probability.
There is also the general process of taking $1 - x$ or $0 - x$ or $c - x$ where $x$ is a variable and $c$ is a constant. This is sometimes referred to as reversing or reflecting a variable.
|
In math/stats terminology, $1/p$ is the reciprocal of $p$. So what is $1-p$ called, if anything?
In addition to $1-p$ being the complement where $p$ is a probability.
There is also the general process of taking $1 - x$ or $0 - x$ or $c - x$ where $x$ is a variable and $c$ is a constant. This is
|
43,778
|
In math/stats terminology, $1/p$ is the reciprocal of $p$. So what is $1-p$ called, if anything?
|
In addition to the answers mentioning that $1-p$ may be regarded as the complement of $p$, it might be useful to note that the reason $1/p$ has a special name is because $1$ is the multiplicative identity (so that $p \times \frac{1}{p} = 1$).
When it comes to addition, the identity is $0$, and the value with a similar special name to the reciprocal is the negation $-p$ (so that $p + (-p) = 0$). For this reason, there's no necessity for $1-p$ to have a special name in the general case.
|
In math/stats terminology, $1/p$ is the reciprocal of $p$. So what is $1-p$ called, if anything?
|
In addition to the answers mentioning that $1-p$ may be regarded as the complement of $p$, it might be useful to note that the reason $1/p$ has a special name is because $1$ is the multiplicative iden
|
In math/stats terminology, $1/p$ is the reciprocal of $p$. So what is $1-p$ called, if anything?
In addition to the answers mentioning that $1-p$ may be regarded as the complement of $p$, it might be useful to note that the reason $1/p$ has a special name is because $1$ is the multiplicative identity (so that $p \times \frac{1}{p} = 1$).
When it comes to addition, the identity is $0$, and the value with a similar special name to the reciprocal is the negation $-p$ (so that $p + (-p) = 0$). For this reason, there's no necessity for $1-p$ to have a special name in the general case.
|
In math/stats terminology, $1/p$ is the reciprocal of $p$. So what is $1-p$ called, if anything?
In addition to the answers mentioning that $1-p$ may be regarded as the complement of $p$, it might be useful to note that the reason $1/p$ has a special name is because $1$ is the multiplicative iden
|
43,779
|
PCA iteratively finds directions of greatest variance; but how to find a whole subspace with greatest variance? [duplicate]
|
The first two are the two best first two. The second one takes the first one into account.
|
PCA iteratively finds directions of greatest variance; but how to find a whole subspace with greates
|
The first two are the two best first two. The second one takes the first one into account.
|
PCA iteratively finds directions of greatest variance; but how to find a whole subspace with greatest variance? [duplicate]
The first two are the two best first two. The second one takes the first one into account.
|
PCA iteratively finds directions of greatest variance; but how to find a whole subspace with greates
The first two are the two best first two. The second one takes the first one into account.
|
43,780
|
PCA iteratively finds directions of greatest variance; but how to find a whole subspace with greatest variance? [duplicate]
|
While I completely agree with the statistical correctness of Peter Flom's answer (+1), I believe it is worth mentioning that Independent component analysis (ICA) might offer an insightful alternative. ICA provides components that are not constrained to be orthogonal with each other; this means that for some purposes ICs might be more helpful than PCs.
Looking to answer the qualitative aspect of the OP's original question: What if I know I only want two principal components in order to visualize my data in 2-dimensions ? ICs can be rather helpful as ICA tries to minimize the mutual information among the projected data.
Check for example my following shamelessly ripped-off figure (from the excellent Bayesian Reasoning and Machine Learning by David Barber (Sect 21.6) - I used this figure for a talk, I seem to have misplaced ($\approx$ lost) my original MATLAB code, if I find it I will edit the question to append it):
Here we have a sample of two dimensional data-points (green points). The yellow lines are along the two major modes of variation in the sample defined by us during data generation. We treat them as the "true components/mode of variation".
As you see PCA's first component is indeed very close to the "true" component A. PC1 has to be the mode of maximal variation in the data. The second principal component though is constrained to be orthogonal to the first one; a condition not found in the true components. Therefore if you try to use the PCs as an alternative axis system for your data you won't get the optimal representation in terms of explanatory power (assuming that is want you want to achieve when you visualize your data; you show the data so people get the idea of what is going on). So check also ICA! It might be helpful. :)
(Once more, Peter Flom's answer is the correct answer in terms of principal components, I am huge fan of PCA don't get me wrong, just it is not always the optimal solution. As ttnphns mentioned the definition of best changes things significantly.)
(And don't be tempted to immediately equate orthogonality with statistical independence; they are related but not same; for example see the 1984 fun little paper Linearly Independent, Orthogonal, and Uncorrelated Variables by Rodger et al.)
|
PCA iteratively finds directions of greatest variance; but how to find a whole subspace with greates
|
While I completely agree with the statistical correctness of Peter Flom's answer (+1), I believe it is worth mentioning that Independent component analysis (ICA) might offer an insightful alternative.
|
PCA iteratively finds directions of greatest variance; but how to find a whole subspace with greatest variance? [duplicate]
While I completely agree with the statistical correctness of Peter Flom's answer (+1), I believe it is worth mentioning that Independent component analysis (ICA) might offer an insightful alternative. ICA provides components that are not constrained to be orthogonal with each other; this means that for some purposes ICs might be more helpful than PCs.
Looking to answer the qualitative aspect of the OP's original question: What if I know I only want two principal components in order to visualize my data in 2-dimensions ? ICs can be rather helpful as ICA tries to minimize the mutual information among the projected data.
Check for example my following shamelessly ripped-off figure (from the excellent Bayesian Reasoning and Machine Learning by David Barber (Sect 21.6) - I used this figure for a talk, I seem to have misplaced ($\approx$ lost) my original MATLAB code, if I find it I will edit the question to append it):
Here we have a sample of two dimensional data-points (green points). The yellow lines are along the two major modes of variation in the sample defined by us during data generation. We treat them as the "true components/mode of variation".
As you see PCA's first component is indeed very close to the "true" component A. PC1 has to be the mode of maximal variation in the data. The second principal component though is constrained to be orthogonal to the first one; a condition not found in the true components. Therefore if you try to use the PCs as an alternative axis system for your data you won't get the optimal representation in terms of explanatory power (assuming that is want you want to achieve when you visualize your data; you show the data so people get the idea of what is going on). So check also ICA! It might be helpful. :)
(Once more, Peter Flom's answer is the correct answer in terms of principal components, I am huge fan of PCA don't get me wrong, just it is not always the optimal solution. As ttnphns mentioned the definition of best changes things significantly.)
(And don't be tempted to immediately equate orthogonality with statistical independence; they are related but not same; for example see the 1984 fun little paper Linearly Independent, Orthogonal, and Uncorrelated Variables by Rodger et al.)
|
PCA iteratively finds directions of greatest variance; but how to find a whole subspace with greates
While I completely agree with the statistical correctness of Peter Flom's answer (+1), I believe it is worth mentioning that Independent component analysis (ICA) might offer an insightful alternative.
|
43,781
|
PCA iteratively finds directions of greatest variance; but how to find a whole subspace with greatest variance? [duplicate]
|
Please correct any errors you may find
Principal Components Analysis
Given data matrix $X \in \mathbb{R}^{\text{n x p}}$, where we have $n$ observations and $p$ column vectors, assume the columns of $X$ are centered with mean 0.
For any $v \in \mathbb{R}^p$, the vector $Xv \in \mathbb{R}^n$ has sample mean zero and sample variance $\frac{1}{n}(Xv)^T(Xv)$.
The first principal component direction $v_1 \in \mathbb{R}^p$ is
$v_1 = \underset{||v||_2=1}{\text{argmax}}~(Xv)^T(Xv)$
so the first principal component direction of $X$ is the unit vector $v_1 \in \mathbb{R}^p$ that maximizes the sample variance of $Xv_1 \in \mathbb{R}^p$.
The normalized first principal component score is
$\frac{(Xv_1)}{\sqrt{(Xv_1)^T(Xv_1)}}$
and the amount of variance explained by the first component is just
$\frac{\sqrt{(Xv_1)^T(Xv_1)}}{n}$
The second principal component direction is the unit vector with $v_2^Tv_1=0$, such that $Xv_2 \in \mathbb{R}^p$ has the maximum sample variance over all unit vectors orthogonal to $v_1$.
Now we can generalize further
$v_k = \underset{\underset{v^Tv_j=0, j=1,...k-1}{||v||_2=1}}{\text{argmax}}~(Xv)^T(Xv)$
for the $k^\text{th}$ principal component direction and score.
|
PCA iteratively finds directions of greatest variance; but how to find a whole subspace with greates
|
Please correct any errors you may find
Principal Components Analysis
Given data matrix $X \in \mathbb{R}^{\text{n x p}}$, where we have $n$ observations and $p$ column vectors, assume the columns of $
|
PCA iteratively finds directions of greatest variance; but how to find a whole subspace with greatest variance? [duplicate]
Please correct any errors you may find
Principal Components Analysis
Given data matrix $X \in \mathbb{R}^{\text{n x p}}$, where we have $n$ observations and $p$ column vectors, assume the columns of $X$ are centered with mean 0.
For any $v \in \mathbb{R}^p$, the vector $Xv \in \mathbb{R}^n$ has sample mean zero and sample variance $\frac{1}{n}(Xv)^T(Xv)$.
The first principal component direction $v_1 \in \mathbb{R}^p$ is
$v_1 = \underset{||v||_2=1}{\text{argmax}}~(Xv)^T(Xv)$
so the first principal component direction of $X$ is the unit vector $v_1 \in \mathbb{R}^p$ that maximizes the sample variance of $Xv_1 \in \mathbb{R}^p$.
The normalized first principal component score is
$\frac{(Xv_1)}{\sqrt{(Xv_1)^T(Xv_1)}}$
and the amount of variance explained by the first component is just
$\frac{\sqrt{(Xv_1)^T(Xv_1)}}{n}$
The second principal component direction is the unit vector with $v_2^Tv_1=0$, such that $Xv_2 \in \mathbb{R}^p$ has the maximum sample variance over all unit vectors orthogonal to $v_1$.
Now we can generalize further
$v_k = \underset{\underset{v^Tv_j=0, j=1,...k-1}{||v||_2=1}}{\text{argmax}}~(Xv)^T(Xv)$
for the $k^\text{th}$ principal component direction and score.
|
PCA iteratively finds directions of greatest variance; but how to find a whole subspace with greates
Please correct any errors you may find
Principal Components Analysis
Given data matrix $X \in \mathbb{R}^{\text{n x p}}$, where we have $n$ observations and $p$ column vectors, assume the columns of $
|
43,782
|
If I flipped a coin 5 times (a head=1 and a tails=-1), what would the absolute value of the result be on average?
|
The distribution is binomial distributed and with that you can compute this manually.
If $X$ is the average of five coin flips (which I assume are fair) then
$$\begin{array}{}
P(X = -1) &=& \frac{1}{2^5}\\
P(X = -0.6) &=& \frac{5}{2^5}\\
P(X = -0.2) &=& \frac{10}{2^5}\\
P(X = 0.2)& =& \frac{10}{2^5}\\
P(X = 0.6) &=& \frac{5}{2^5}\\
P(X = 1) &=& \frac{1}{2^5}
\end{array}$$
And the expectation value for any function of the variable is
$$E[f(X)] = \sum_x P(X=x) \cdot f(x)$$
with $f(X) = |X|$ you can get your answer which should be close to the approximation below.
In the limit, you can estimate this with the half normal distribution, which has an expectation value of $\sigma \sqrt{\frac{2}{\pi}}$ and the distribution of the mean of $n$ coin flips is approximated by taking $\sigma = 1/ \sqrt{ n}$ giving
$$E[|X_n|] \approx \sqrt{\frac{2}{n\pi}}$$
which is equal to about $0.3568248$ in the case of $n = 5$, a bit less than 5% away from the exact answer.
|
If I flipped a coin 5 times (a head=1 and a tails=-1), what would the absolute value of the result b
|
The distribution is binomial distributed and with that you can compute this manually.
If $X$ is the average of five coin flips (which I assume are fair) then
$$\begin{array}{}
P(X = -1) &=& \frac{1}{2
|
If I flipped a coin 5 times (a head=1 and a tails=-1), what would the absolute value of the result be on average?
The distribution is binomial distributed and with that you can compute this manually.
If $X$ is the average of five coin flips (which I assume are fair) then
$$\begin{array}{}
P(X = -1) &=& \frac{1}{2^5}\\
P(X = -0.6) &=& \frac{5}{2^5}\\
P(X = -0.2) &=& \frac{10}{2^5}\\
P(X = 0.2)& =& \frac{10}{2^5}\\
P(X = 0.6) &=& \frac{5}{2^5}\\
P(X = 1) &=& \frac{1}{2^5}
\end{array}$$
And the expectation value for any function of the variable is
$$E[f(X)] = \sum_x P(X=x) \cdot f(x)$$
with $f(X) = |X|$ you can get your answer which should be close to the approximation below.
In the limit, you can estimate this with the half normal distribution, which has an expectation value of $\sigma \sqrt{\frac{2}{\pi}}$ and the distribution of the mean of $n$ coin flips is approximated by taking $\sigma = 1/ \sqrt{ n}$ giving
$$E[|X_n|] \approx \sqrt{\frac{2}{n\pi}}$$
which is equal to about $0.3568248$ in the case of $n = 5$, a bit less than 5% away from the exact answer.
|
If I flipped a coin 5 times (a head=1 and a tails=-1), what would the absolute value of the result b
The distribution is binomial distributed and with that you can compute this manually.
If $X$ is the average of five coin flips (which I assume are fair) then
$$\begin{array}{}
P(X = -1) &=& \frac{1}{2
|
43,783
|
If I flipped a coin 5 times (a head=1 and a tails=-1), what would the absolute value of the result be on average?
|
In addition to the excellent answers by Sextus Empiricus and Dave, when you don't know how to approach a problem, a naive but very effective way to get an approximate answer is by just simulating the process you describe.
In R you could do this as follows:
set.seed(1234)
MC <- 1e5
x <- numeric(MC)
for(i in 1:MC){
x[i] <- abs(mean(sample(c(-1, 1), 5, replace = TRUE)))
}
mean(x)
Which results in 0.37564, fairly close to the actual answer. Even when you think you know how to answer a question, simulation can still be useful to 'check' your results.
|
If I flipped a coin 5 times (a head=1 and a tails=-1), what would the absolute value of the result b
|
In addition to the excellent answers by Sextus Empiricus and Dave, when you don't know how to approach a problem, a naive but very effective way to get an approximate answer is by just simulating the
|
If I flipped a coin 5 times (a head=1 and a tails=-1), what would the absolute value of the result be on average?
In addition to the excellent answers by Sextus Empiricus and Dave, when you don't know how to approach a problem, a naive but very effective way to get an approximate answer is by just simulating the process you describe.
In R you could do this as follows:
set.seed(1234)
MC <- 1e5
x <- numeric(MC)
for(i in 1:MC){
x[i] <- abs(mean(sample(c(-1, 1), 5, replace = TRUE)))
}
mean(x)
Which results in 0.37564, fairly close to the actual answer. Even when you think you know how to answer a question, simulation can still be useful to 'check' your results.
|
If I flipped a coin 5 times (a head=1 and a tails=-1), what would the absolute value of the result b
In addition to the excellent answers by Sextus Empiricus and Dave, when you don't know how to approach a problem, a naive but very effective way to get an approximate answer is by just simulating the
|
43,784
|
If I flipped a coin 5 times (a head=1 and a tails=-1), what would the absolute value of the result be on average?
|
Since this appears to be a self-study question, I will give some guidance rather than solve it all.
You can be very formal about how to define average value (what statisticians and mathematicians would call an expected value), to which the linked content about the law of the unconscious statisticians refers. However, taking advanced proofs as given (they are, after all, true), the average you seek is the sum of the values resulting from your procedure (add up the values, then take the absolute value), with each value weighted by the probability of it occurring.
Define $v_i$ as the value arising from applying your procedure to flipping $i$ heads, so $v_5 = 5$, $v_0=5$, $v_2 = 1$, etc. Next, define $p_i$ as the probability of flipping $i$ heads, so $p_5 = p_0 = 0.5^5 = 0.03125$, etc.
Then the sum of the values weighted by the probability of obtaining that value, is:
$$
\overset{5}{\underset{i=0}{\sum}} p_iv_i = p_0v_0 + p_1v_1 + p_2v_2+p_3v_3 + p_4v_4 + p_5v_5
$$
Now just calculate those $p_i$ and $v_i$ values, and I've already given you some (but make sure you know how to calculate them). I think you will find $v_i$ trivial. For $p_i$, you will find life easier if you use the PMF of the binomial distribution, which is contained in the linked Wikipedia article in the comments (and again here).
|
If I flipped a coin 5 times (a head=1 and a tails=-1), what would the absolute value of the result b
|
Since this appears to be a self-study question, I will give some guidance rather than solve it all.
You can be very formal about how to define average value (what statisticians and mathematicians woul
|
If I flipped a coin 5 times (a head=1 and a tails=-1), what would the absolute value of the result be on average?
Since this appears to be a self-study question, I will give some guidance rather than solve it all.
You can be very formal about how to define average value (what statisticians and mathematicians would call an expected value), to which the linked content about the law of the unconscious statisticians refers. However, taking advanced proofs as given (they are, after all, true), the average you seek is the sum of the values resulting from your procedure (add up the values, then take the absolute value), with each value weighted by the probability of it occurring.
Define $v_i$ as the value arising from applying your procedure to flipping $i$ heads, so $v_5 = 5$, $v_0=5$, $v_2 = 1$, etc. Next, define $p_i$ as the probability of flipping $i$ heads, so $p_5 = p_0 = 0.5^5 = 0.03125$, etc.
Then the sum of the values weighted by the probability of obtaining that value, is:
$$
\overset{5}{\underset{i=0}{\sum}} p_iv_i = p_0v_0 + p_1v_1 + p_2v_2+p_3v_3 + p_4v_4 + p_5v_5
$$
Now just calculate those $p_i$ and $v_i$ values, and I've already given you some (but make sure you know how to calculate them). I think you will find $v_i$ trivial. For $p_i$, you will find life easier if you use the PMF of the binomial distribution, which is contained in the linked Wikipedia article in the comments (and again here).
|
If I flipped a coin 5 times (a head=1 and a tails=-1), what would the absolute value of the result b
Since this appears to be a self-study question, I will give some guidance rather than solve it all.
You can be very formal about how to define average value (what statisticians and mathematicians woul
|
43,785
|
If I flipped a coin 5 times (a head=1 and a tails=-1), what would the absolute value of the result be on average?
|
There are 32 different equally probable outcomes of 5 throws, of which two have absolute value of sum of throws equal to 5, 10 have 3, and 20 have 1, so total sum of all these cases is $5\times2 + 3\times10 + 1\times20 = 60$. To get average, we need to devide 60 by number of total cases which is 32. $\frac{60}{32} = \frac{15}{8}$. That is expectation of sums, average is sum divided by 5, so if you want to get expectation of averages, then you divide expectation of sums by 5 and get $\frac{3}{8}$.
|
If I flipped a coin 5 times (a head=1 and a tails=-1), what would the absolute value of the result b
|
There are 32 different equally probable outcomes of 5 throws, of which two have absolute value of sum of throws equal to 5, 10 have 3, and 20 have 1, so total sum of all these cases is $5\times2 + 3\t
|
If I flipped a coin 5 times (a head=1 and a tails=-1), what would the absolute value of the result be on average?
There are 32 different equally probable outcomes of 5 throws, of which two have absolute value of sum of throws equal to 5, 10 have 3, and 20 have 1, so total sum of all these cases is $5\times2 + 3\times10 + 1\times20 = 60$. To get average, we need to devide 60 by number of total cases which is 32. $\frac{60}{32} = \frac{15}{8}$. That is expectation of sums, average is sum divided by 5, so if you want to get expectation of averages, then you divide expectation of sums by 5 and get $\frac{3}{8}$.
|
If I flipped a coin 5 times (a head=1 and a tails=-1), what would the absolute value of the result b
There are 32 different equally probable outcomes of 5 throws, of which two have absolute value of sum of throws equal to 5, 10 have 3, and 20 have 1, so total sum of all these cases is $5\times2 + 3\t
|
43,786
|
If I flipped a coin 5 times (a head=1 and a tails=-1), what would the absolute value of the result be on average?
|
I get zero by two methods, a Mathematica simulation, and a counting argument.
Mathematica simulation:
results = {}; results2={};
Module[{n = 10000000, outer, inner},
AbsoluteTiming[
For[k = 1, k <= 5, ++k,
sum1 = 0;
For[outer = 1, outer <= n, ++outer,
sum2 = 0;
For[inner = 1, inner <= 5, ++inner,
sum2 += RandomChoice[{-1, 1}]
];
AppendTo[results,sum2];
sum1 += sum2/5.0;
];
Print["{n, sum2, sum1/n}", {n, sum2, sum1/N[n]}];
AppendTo[results, {n, sum2, sum1/N[n]}];
]
]
]
results:
n = # Flips Sum last Average of n flips
5 flips
10000, 1, 0.0006400000000000063
10000, -3, -0.007840000000000005
10000, -1, -0.004319999999999987
10000, -3, -0.0022799999999999947
10000, 1, 0.00899999999999997
100000, -1, 0.0005719999999999979
100000, 3, 0.0025119999999999774
100000, -1, -0.000683999999999993
100000, -3, -0.0034999999999999923
100000, -1, 0.0016439999999999894
1000000, -3, -0.00005719999999999856
1000000, 1, 0.0005504000000000307
1000000, 1, 0.000036799999999996686
1000000, -1, 0.00013999999999999622
1000000, 1, 0.0006572000000000153
10000000, -1, -0.00001588000000000591
10000000, 3, -2.8800000000038654e-6
10000000, 1, -0.00011363999999998875
10000000, 3, 0.00022167999999998797
10000000, -1, 0.000014039999999994434
The counting argument:
only six sums are possible
-5,-3,-1,+1,+3,+5 and the averages are those divided by 5.
The sums of equal absolute value have an equal number of terms.
Since the negative and positive values cancel each other out, the average is zero.
Here is a count of the number of sums of each kind:
Tally[results2] ->
{{-1, 312475}, {1, 312595}, {5, 31378}, {-3, 155964}, {3,
156121}, {-5, 31467}}
|
If I flipped a coin 5 times (a head=1 and a tails=-1), what would the absolute value of the result b
|
I get zero by two methods, a Mathematica simulation, and a counting argument.
Mathematica simulation:
results = {}; results2={};
Module[{n = 10000000, outer, inner},
AbsoluteTiming[
For[k = 1, k <=
|
If I flipped a coin 5 times (a head=1 and a tails=-1), what would the absolute value of the result be on average?
I get zero by two methods, a Mathematica simulation, and a counting argument.
Mathematica simulation:
results = {}; results2={};
Module[{n = 10000000, outer, inner},
AbsoluteTiming[
For[k = 1, k <= 5, ++k,
sum1 = 0;
For[outer = 1, outer <= n, ++outer,
sum2 = 0;
For[inner = 1, inner <= 5, ++inner,
sum2 += RandomChoice[{-1, 1}]
];
AppendTo[results,sum2];
sum1 += sum2/5.0;
];
Print["{n, sum2, sum1/n}", {n, sum2, sum1/N[n]}];
AppendTo[results, {n, sum2, sum1/N[n]}];
]
]
]
results:
n = # Flips Sum last Average of n flips
5 flips
10000, 1, 0.0006400000000000063
10000, -3, -0.007840000000000005
10000, -1, -0.004319999999999987
10000, -3, -0.0022799999999999947
10000, 1, 0.00899999999999997
100000, -1, 0.0005719999999999979
100000, 3, 0.0025119999999999774
100000, -1, -0.000683999999999993
100000, -3, -0.0034999999999999923
100000, -1, 0.0016439999999999894
1000000, -3, -0.00005719999999999856
1000000, 1, 0.0005504000000000307
1000000, 1, 0.000036799999999996686
1000000, -1, 0.00013999999999999622
1000000, 1, 0.0006572000000000153
10000000, -1, -0.00001588000000000591
10000000, 3, -2.8800000000038654e-6
10000000, 1, -0.00011363999999998875
10000000, 3, 0.00022167999999998797
10000000, -1, 0.000014039999999994434
The counting argument:
only six sums are possible
-5,-3,-1,+1,+3,+5 and the averages are those divided by 5.
The sums of equal absolute value have an equal number of terms.
Since the negative and positive values cancel each other out, the average is zero.
Here is a count of the number of sums of each kind:
Tally[results2] ->
{{-1, 312475}, {1, 312595}, {5, 31378}, {-3, 155964}, {3,
156121}, {-5, 31467}}
|
If I flipped a coin 5 times (a head=1 and a tails=-1), what would the absolute value of the result b
I get zero by two methods, a Mathematica simulation, and a counting argument.
Mathematica simulation:
results = {}; results2={};
Module[{n = 10000000, outer, inner},
AbsoluteTiming[
For[k = 1, k <=
|
43,787
|
Student's t-test on "high" magnitude numbers
|
The t-test does not care about the magnitudes of your values. The t-test concerns itself with their variance. You are correct that your numbers look to be roughly aligned. However, the distributions appear to be rather tightly clustered, meaning low enough variance for the difference in means to be statistically significant.
What you’re allowed to do is ignore the statistical significance and decide that the means are close enough together, based on your knowledge of the process under study, that you accept this difference. This gets into practical significance, as opposed to statistical significance.
|
Student's t-test on "high" magnitude numbers
|
The t-test does not care about the magnitudes of your values. The t-test concerns itself with their variance. You are correct that your numbers look to be roughly aligned. However, the distributions a
|
Student's t-test on "high" magnitude numbers
The t-test does not care about the magnitudes of your values. The t-test concerns itself with their variance. You are correct that your numbers look to be roughly aligned. However, the distributions appear to be rather tightly clustered, meaning low enough variance for the difference in means to be statistically significant.
What you’re allowed to do is ignore the statistical significance and decide that the means are close enough together, based on your knowledge of the process under study, that you accept this difference. This gets into practical significance, as opposed to statistical significance.
|
Student's t-test on "high" magnitude numbers
The t-test does not care about the magnitudes of your values. The t-test concerns itself with their variance. You are correct that your numbers look to be roughly aligned. However, the distributions a
|
43,788
|
Student's t-test on "high" magnitude numbers
|
This is more of a comment or extension to the answer by @Dave. You should always plot your data, and could have included such a plot in your question. Below is plots that help to show the difference between the groups. I use R for the plots, at the end I give the code used.
This is simply a boxplot with the individual points overplotted. Alternatively, we can show histograms:
The R code used is:
A1 <- c(
4670, 4646, 4612, 4618, 4646,
4609, 4623, 4629, 4566, 4628,
4582, 4636, 4621, 4574, 4624,
4563, 4651, 4642, 4586, 4621,
4606, 4628, 4575, 4631, 4646,
4600, 4594, 4661, 4568, 4611
)
B1 <- c(
4630, 4655, 4652, 4633, 4637,
4661, 4625, 4680, 4647, 4639,
4633, 4661, 4638, 4621, 4630,
4682, 4703, 4665, 4652, 4648,
4673, 4651, 4669, 4646, 4612,
4654, 4651, 4619, 4637, 4620
)
library(ggplot2)
library(hrbrthemes)
df <- data.frame( req = c(A1, B1),
benchmark=c(rep("A", length(A1)), rep("B", length(B1)))
)
ggplot(df, aes(benchmark, req, color=benchmark)) + geom_boxplot() +
geom_point()
### Side-by-side histograms
ggplot(df,aes(req, ..density.., fill=benchmark)) +
geom_histogram(color="#e9ecef",alpha=0.4, bins=10, position="identity") +
theme_ipsum() + scale_fill_manual(values=c("#69b3a2", "#404080"))
|
Student's t-test on "high" magnitude numbers
|
This is more of a comment or extension to the answer by @Dave. You should always plot your data, and could have included such a plot in your question. Below is plots that help to show the difference
|
Student's t-test on "high" magnitude numbers
This is more of a comment or extension to the answer by @Dave. You should always plot your data, and could have included such a plot in your question. Below is plots that help to show the difference between the groups. I use R for the plots, at the end I give the code used.
This is simply a boxplot with the individual points overplotted. Alternatively, we can show histograms:
The R code used is:
A1 <- c(
4670, 4646, 4612, 4618, 4646,
4609, 4623, 4629, 4566, 4628,
4582, 4636, 4621, 4574, 4624,
4563, 4651, 4642, 4586, 4621,
4606, 4628, 4575, 4631, 4646,
4600, 4594, 4661, 4568, 4611
)
B1 <- c(
4630, 4655, 4652, 4633, 4637,
4661, 4625, 4680, 4647, 4639,
4633, 4661, 4638, 4621, 4630,
4682, 4703, 4665, 4652, 4648,
4673, 4651, 4669, 4646, 4612,
4654, 4651, 4619, 4637, 4620
)
library(ggplot2)
library(hrbrthemes)
df <- data.frame( req = c(A1, B1),
benchmark=c(rep("A", length(A1)), rep("B", length(B1)))
)
ggplot(df, aes(benchmark, req, color=benchmark)) + geom_boxplot() +
geom_point()
### Side-by-side histograms
ggplot(df,aes(req, ..density.., fill=benchmark)) +
geom_histogram(color="#e9ecef",alpha=0.4, bins=10, position="identity") +
theme_ipsum() + scale_fill_manual(values=c("#69b3a2", "#404080"))
|
Student's t-test on "high" magnitude numbers
This is more of a comment or extension to the answer by @Dave. You should always plot your data, and could have included such a plot in your question. Below is plots that help to show the difference
|
43,789
|
Student's t-test on "high" magnitude numbers
|
I strongly support the stance of @kjetil b halvorsen that visualization is the first priority. This would be a comment on his answer except that I have a different graph to show.
The spirit of plotting all the data, plus a summary, is excellent. Kjetil's graph in practice raises two comments on details.
The plot doesn't show means. As it happens, the means are close to the medians, but you are not always so lucky.
A dot plot or strip plot in a single line will not be easy to work with if there is much over=plotting of similar or identical values. Same comment: As it happens, that is not a major problem here, but you are not always so lucky.
This plot follows the spirit of Emanuel Parzen's suggestion that a quantile plot together with a box gives a good picture of the data.
The boxes conventionally show medians and quartiles. The quantile plos show the points in order with a tacit horizontal scale of rank or plotting position. So, outliers, gaps, tied values and other fine structure are all evident if they exist. The longer horizontal lines show the means. (Incidentally, each mean is also the area under the quantile function expressed as a continuous curve and as a function of cumulative probability.)
|
Student's t-test on "high" magnitude numbers
|
I strongly support the stance of @kjetil b halvorsen that visualization is the first priority. This would be a comment on his answer except that I have a different graph to show.
The spirit of plottin
|
Student's t-test on "high" magnitude numbers
I strongly support the stance of @kjetil b halvorsen that visualization is the first priority. This would be a comment on his answer except that I have a different graph to show.
The spirit of plotting all the data, plus a summary, is excellent. Kjetil's graph in practice raises two comments on details.
The plot doesn't show means. As it happens, the means are close to the medians, but you are not always so lucky.
A dot plot or strip plot in a single line will not be easy to work with if there is much over=plotting of similar or identical values. Same comment: As it happens, that is not a major problem here, but you are not always so lucky.
This plot follows the spirit of Emanuel Parzen's suggestion that a quantile plot together with a box gives a good picture of the data.
The boxes conventionally show medians and quartiles. The quantile plos show the points in order with a tacit horizontal scale of rank or plotting position. So, outliers, gaps, tied values and other fine structure are all evident if they exist. The longer horizontal lines show the means. (Incidentally, each mean is also the area under the quantile function expressed as a continuous curve and as a function of cumulative probability.)
|
Student's t-test on "high" magnitude numbers
I strongly support the stance of @kjetil b halvorsen that visualization is the first priority. This would be a comment on his answer except that I have a different graph to show.
The spirit of plottin
|
43,790
|
Is statistical insignificance fatal?
|
Statistical insignificance does not mean that the effect being tested for does not exist, but rather, that the data that was observed does not furnish strong evidence for the existence of that effect.
For example, if you have an unloaded six-sided die, but the numbers on its faces are {1,2,3,4,5,5} instead of {1,2,3,4,5,6}, and you roll it only 3 times, it may not be evident through such a small sample size that the die would give you more fives than ones. That doesn't mean the die isn't different than a normal die (after all, we have the benefit of inspecting it and we can clearly see it is different)--it may simply be that we need to collect more data about the die's observed behavior in order to make a statistically significant inference about the intrinsic properties of the die.
Analogously, it may be that even a sample size of 30000 may not be sufficient to detect a difference in the behavior of your population under two treatments, because your statistical test has low power. Or, maybe the truth is that the mean increase you're observing is actually due to random chance and no effect truly exists. Since you have not specified your tolerance for Type I error, I can't really speak to that.
The takeaway here is that failure to detect significance doesn't mean no effect exists--it simply means that, by random chance or by lack of power, the data furnishes insufficient evidence to claim that the hypothesized effect exists with a high degree of confidence.
|
Is statistical insignificance fatal?
|
Statistical insignificance does not mean that the effect being tested for does not exist, but rather, that the data that was observed does not furnish strong evidence for the existence of that effect.
|
Is statistical insignificance fatal?
Statistical insignificance does not mean that the effect being tested for does not exist, but rather, that the data that was observed does not furnish strong evidence for the existence of that effect.
For example, if you have an unloaded six-sided die, but the numbers on its faces are {1,2,3,4,5,5} instead of {1,2,3,4,5,6}, and you roll it only 3 times, it may not be evident through such a small sample size that the die would give you more fives than ones. That doesn't mean the die isn't different than a normal die (after all, we have the benefit of inspecting it and we can clearly see it is different)--it may simply be that we need to collect more data about the die's observed behavior in order to make a statistically significant inference about the intrinsic properties of the die.
Analogously, it may be that even a sample size of 30000 may not be sufficient to detect a difference in the behavior of your population under two treatments, because your statistical test has low power. Or, maybe the truth is that the mean increase you're observing is actually due to random chance and no effect truly exists. Since you have not specified your tolerance for Type I error, I can't really speak to that.
The takeaway here is that failure to detect significance doesn't mean no effect exists--it simply means that, by random chance or by lack of power, the data furnishes insufficient evidence to claim that the hypothesized effect exists with a high degree of confidence.
|
Is statistical insignificance fatal?
Statistical insignificance does not mean that the effect being tested for does not exist, but rather, that the data that was observed does not furnish strong evidence for the existence of that effect.
|
43,791
|
Is statistical insignificance fatal?
|
Well, this is certainly not good news. Sorry.
Your results don not provide any evidence for the existence of an effect. The effect, of course, might still exist: it could be smaller or more variable than you expected, or your experiment was somehow flawed and failed to detect it.
So, what can you do now?
0) Check your data. Make sure nothing silly has happened. Missing values sometimes get coded as 0s/-1s/99s, and these numbers obviously shouldn't be entered into your analysis as actual values. Similarly, if you're randomizing people to treatments/controls, make sure these groups are actually similar. People get bitten by these sorts of bugs all the time.
1) Perform a power analysis. Ideally, you would have performed one before beginning the project, but doing one now can still help you determine whether your experiment, as performed, would have a reasonable chance of detecting your expected effect. If not, (perhaps your drop-out/noncompliance rate was very high), you might want to perform a larger experiment.
You should not add subjects, run the analysis, and repeat until your result becomes significant, but there are lots of strategies for mitigating the problems associated with taking multiple "looks" at your data.
2) Look at sub-groups and covariates. Perhaps your proposed intervention works best in a specific geographical region, or for younger families, or whatever. In general, it would best to specify all of these comparisons ahead of time, since exploiting "experimenter degrees of freedom" can dramatically increase the false positive rate.
That said, there's nothing wrong with looking per se. You just need to be upfront about the fact that these are post-hoc/exploratory analyses, and provide weaker evidence than an explicitly confirmatory study. Obviously, it helps a lot if you can identify plausible reasons for why the subgroups differ. If you find a hugely significant effect in the North, but nothing in the drought-stricken, war-ravaged South, then you are in pretty good shape. On the other hand, I'd be a lot more skeptical about a claim that it works on subgroups of people born during full moons but only at high tide :-)
If you do find something, you may be tempted to publish right away. Many people do, but your argument would be much stronger if you could confirm it in a second sample. As a compromise, consider holding out some of your data as a validation set; use some of the data to look for covariates and the validation set to confirm your final model.
3) Could a null result be informative? If previous work has found similar effects, it may be useful to see if you identify factors that explain why they weren't repeated in your population. Publishing null results/failures-to-replicate is often tricky because one needs to convince reviewers that your experiment is sufficiently well-designed and well-powered to detect the sought-after effect. With $n=30,000$ however, you are probably in pretty good shape on that front.
Good luck!
|
Is statistical insignificance fatal?
|
Well, this is certainly not good news. Sorry.
Your results don not provide any evidence for the existence of an effect. The effect, of course, might still exist: it could be smaller or more variable t
|
Is statistical insignificance fatal?
Well, this is certainly not good news. Sorry.
Your results don not provide any evidence for the existence of an effect. The effect, of course, might still exist: it could be smaller or more variable than you expected, or your experiment was somehow flawed and failed to detect it.
So, what can you do now?
0) Check your data. Make sure nothing silly has happened. Missing values sometimes get coded as 0s/-1s/99s, and these numbers obviously shouldn't be entered into your analysis as actual values. Similarly, if you're randomizing people to treatments/controls, make sure these groups are actually similar. People get bitten by these sorts of bugs all the time.
1) Perform a power analysis. Ideally, you would have performed one before beginning the project, but doing one now can still help you determine whether your experiment, as performed, would have a reasonable chance of detecting your expected effect. If not, (perhaps your drop-out/noncompliance rate was very high), you might want to perform a larger experiment.
You should not add subjects, run the analysis, and repeat until your result becomes significant, but there are lots of strategies for mitigating the problems associated with taking multiple "looks" at your data.
2) Look at sub-groups and covariates. Perhaps your proposed intervention works best in a specific geographical region, or for younger families, or whatever. In general, it would best to specify all of these comparisons ahead of time, since exploiting "experimenter degrees of freedom" can dramatically increase the false positive rate.
That said, there's nothing wrong with looking per se. You just need to be upfront about the fact that these are post-hoc/exploratory analyses, and provide weaker evidence than an explicitly confirmatory study. Obviously, it helps a lot if you can identify plausible reasons for why the subgroups differ. If you find a hugely significant effect in the North, but nothing in the drought-stricken, war-ravaged South, then you are in pretty good shape. On the other hand, I'd be a lot more skeptical about a claim that it works on subgroups of people born during full moons but only at high tide :-)
If you do find something, you may be tempted to publish right away. Many people do, but your argument would be much stronger if you could confirm it in a second sample. As a compromise, consider holding out some of your data as a validation set; use some of the data to look for covariates and the validation set to confirm your final model.
3) Could a null result be informative? If previous work has found similar effects, it may be useful to see if you identify factors that explain why they weren't repeated in your population. Publishing null results/failures-to-replicate is often tricky because one needs to convince reviewers that your experiment is sufficiently well-designed and well-powered to detect the sought-after effect. With $n=30,000$ however, you are probably in pretty good shape on that front.
Good luck!
|
Is statistical insignificance fatal?
Well, this is certainly not good news. Sorry.
Your results don not provide any evidence for the existence of an effect. The effect, of course, might still exist: it could be smaller or more variable t
|
43,792
|
Is statistical insignificance fatal?
|
Regarding the title question: Categorically, no. In your case, not enough info, hence my comment and downvote. Also, IMO, questions that conflate statistical and practical significance have been done half-to-death here, and you haven't said enough to make your question unique. Please edit; I'll undo my downvote if I see improvement (it's locked now), and probably upvote if it's substantial. Your question addresses a common, important misconception that deserves being done the rest of the way to death, but as is, it's hard to say anything new about your situation that would make it a useful example.
From a statistical viewpoint, has the intervention failed, and if not what further can be done?
Again, what have you done so far? It's also quite possible that your analysis has failed, to borrow your term (IMO, "failed" is clearly too harsh in both cases). This is why I asked about your test. There's a fair amount of controversy surrounding pre-post analysis options, and random sampling or lack thereof is relevant to the choice of analytic options (see "Best practice when analysing pre-post treatment-control designs"). This is why I asked about a control group.
If your choice of test can be improved, do that (obviously). In addition to checking your data (as @MattKrause wisely suggested), check your test's assumptions. There are quite a few involved in the usual pre-post designs, and they're violated often.
Normal distributions are likely to be poor models, especially for change scores and financial data. Consider nonparametric analyses.
Heteroskedasticity is common, especially without random selection or with a partially stochastic intervention. Some tests are more sensitive to this than others – especially the conventional ones.
Conventional ANCOVA assumes no interaction between interventions and covariates. If baseline income affects the viability of the intervention, you should probably use moderated regression instead $(\text{Final Income = Baseline Income + Intervention? + Interaction + Error}$, basically), assuming you do have a control group. If you don't, do you have more than 2 times?
What other info about your individuals do you have? Exploring covariates and moderators is a good way to reduce the amount of statistical "noise" (error) your intervention's "signal" (effect) has to overwhelm for your test to "detect" it (support rejection of the null). If you can explain a lot of variance by means other than your intervention, or explain why your intervention doesn't affect everyone equally, you might get a better sense of how big your intervention's effect really is, all else being equal – which is rarely the default state of nature. I believe this was the spirit of Matt's suggestion #2.
Regarding his caveat, don't be afraid to explore covariates and moderators you haven't specified in advance; just adopt an exploratory mindset and acknowledge this epistemological transition explicitly in any report you publish. The crucial point that bears repeating about statistical and practical significance is that their overlap is generally limited. Much of the practical significance of statistical significance is in what you intend to make of it. If you're seeking evidence to support further research (e.g., for a research grant), rejection of exploratory hypotheses may be enough. AFAIK, this is the only kind of practical significance that statistical significance is supposed to imply by default, and explains the choice of terminology historically: significant enough to justify more research.
If you're looking for a statistical viewpoint on whether your intervention is worthwhile, you're probably asking in the wrong way. Statistical significance is not intended to answer this by itself; it only directly represents an answer to a very specific question about a null hypothesis. I suppose this amounts to another suggestion: check your null hypothesis. It usually defaults to stating that the effect observed in your sample is due entirely to sampling error (i.e., effect of intervention = 0). Are you really interested in any change whatsoever? How consistent do you need it to be to justify the intervention? These questions partly decide the appropriate null; you need to answer them.
In confirmatory testing, you need to answer in advance. Since you've already run a test, any new tests of the same kind with different null hypotheses but the same sample would be exploratory. Unless you can collect another sample, it would probably be best to regard other kinds of tests as exploratory too. The strict sense of confirmatory hypothesis testing is particularly strict about the "no peeking" rule; IMO, this is a weakness of the hypothesis-testing paradigm as a whole. AFAIK, Bayesian analysis can be a little less strict about this, and might benefit you particularly if you can collect more data, because your current result could help inform your prior probability distribution.
Another way to approach the issue is by focusing on effect size and your confidence interval. $2K is a change in the direction you wanted, right? If your test's results meant what I think you think they meant, then there's a better than 5% chance you'd find a negative change if you were to repeat the study, assuming the intervention had no effect. If your investment had any positive effect at all, the probability is lower than your p value. If you're invested heavily enough in the prospect of the treatment, maybe you should replicate the study. Again, you know better than I what else affects that decision.
P.S. Despite my intro, I've managed to say plenty about this "half-dead" topic. Hopefully I've provided a useful summary of ideas other than those in preexisting answers, but I wouldn't be surprised if much of it isn't very useful to you personally. A big reason I wanted more info is that answering a vague question well practically necessitates covering a lot of unnecessary bases, which is kind of a waste of time. Nonetheless, if you grace us with an edit, I'll probably subsection off whatever no longer applies, and I might expand on what still does. It's evident from the incoming views that the question resonates with the audience here, so this could become a very useful question with a little more work.
|
Is statistical insignificance fatal?
|
Regarding the title question: Categorically, no. In your case, not enough info, hence my comment and downvote. Also, IMO, questions that conflate statistical and practical significance have been done
|
Is statistical insignificance fatal?
Regarding the title question: Categorically, no. In your case, not enough info, hence my comment and downvote. Also, IMO, questions that conflate statistical and practical significance have been done half-to-death here, and you haven't said enough to make your question unique. Please edit; I'll undo my downvote if I see improvement (it's locked now), and probably upvote if it's substantial. Your question addresses a common, important misconception that deserves being done the rest of the way to death, but as is, it's hard to say anything new about your situation that would make it a useful example.
From a statistical viewpoint, has the intervention failed, and if not what further can be done?
Again, what have you done so far? It's also quite possible that your analysis has failed, to borrow your term (IMO, "failed" is clearly too harsh in both cases). This is why I asked about your test. There's a fair amount of controversy surrounding pre-post analysis options, and random sampling or lack thereof is relevant to the choice of analytic options (see "Best practice when analysing pre-post treatment-control designs"). This is why I asked about a control group.
If your choice of test can be improved, do that (obviously). In addition to checking your data (as @MattKrause wisely suggested), check your test's assumptions. There are quite a few involved in the usual pre-post designs, and they're violated often.
Normal distributions are likely to be poor models, especially for change scores and financial data. Consider nonparametric analyses.
Heteroskedasticity is common, especially without random selection or with a partially stochastic intervention. Some tests are more sensitive to this than others – especially the conventional ones.
Conventional ANCOVA assumes no interaction between interventions and covariates. If baseline income affects the viability of the intervention, you should probably use moderated regression instead $(\text{Final Income = Baseline Income + Intervention? + Interaction + Error}$, basically), assuming you do have a control group. If you don't, do you have more than 2 times?
What other info about your individuals do you have? Exploring covariates and moderators is a good way to reduce the amount of statistical "noise" (error) your intervention's "signal" (effect) has to overwhelm for your test to "detect" it (support rejection of the null). If you can explain a lot of variance by means other than your intervention, or explain why your intervention doesn't affect everyone equally, you might get a better sense of how big your intervention's effect really is, all else being equal – which is rarely the default state of nature. I believe this was the spirit of Matt's suggestion #2.
Regarding his caveat, don't be afraid to explore covariates and moderators you haven't specified in advance; just adopt an exploratory mindset and acknowledge this epistemological transition explicitly in any report you publish. The crucial point that bears repeating about statistical and practical significance is that their overlap is generally limited. Much of the practical significance of statistical significance is in what you intend to make of it. If you're seeking evidence to support further research (e.g., for a research grant), rejection of exploratory hypotheses may be enough. AFAIK, this is the only kind of practical significance that statistical significance is supposed to imply by default, and explains the choice of terminology historically: significant enough to justify more research.
If you're looking for a statistical viewpoint on whether your intervention is worthwhile, you're probably asking in the wrong way. Statistical significance is not intended to answer this by itself; it only directly represents an answer to a very specific question about a null hypothesis. I suppose this amounts to another suggestion: check your null hypothesis. It usually defaults to stating that the effect observed in your sample is due entirely to sampling error (i.e., effect of intervention = 0). Are you really interested in any change whatsoever? How consistent do you need it to be to justify the intervention? These questions partly decide the appropriate null; you need to answer them.
In confirmatory testing, you need to answer in advance. Since you've already run a test, any new tests of the same kind with different null hypotheses but the same sample would be exploratory. Unless you can collect another sample, it would probably be best to regard other kinds of tests as exploratory too. The strict sense of confirmatory hypothesis testing is particularly strict about the "no peeking" rule; IMO, this is a weakness of the hypothesis-testing paradigm as a whole. AFAIK, Bayesian analysis can be a little less strict about this, and might benefit you particularly if you can collect more data, because your current result could help inform your prior probability distribution.
Another way to approach the issue is by focusing on effect size and your confidence interval. $2K is a change in the direction you wanted, right? If your test's results meant what I think you think they meant, then there's a better than 5% chance you'd find a negative change if you were to repeat the study, assuming the intervention had no effect. If your investment had any positive effect at all, the probability is lower than your p value. If you're invested heavily enough in the prospect of the treatment, maybe you should replicate the study. Again, you know better than I what else affects that decision.
P.S. Despite my intro, I've managed to say plenty about this "half-dead" topic. Hopefully I've provided a useful summary of ideas other than those in preexisting answers, but I wouldn't be surprised if much of it isn't very useful to you personally. A big reason I wanted more info is that answering a vague question well practically necessitates covering a lot of unnecessary bases, which is kind of a waste of time. Nonetheless, if you grace us with an edit, I'll probably subsection off whatever no longer applies, and I might expand on what still does. It's evident from the incoming views that the question resonates with the audience here, so this could become a very useful question with a little more work.
|
Is statistical insignificance fatal?
Regarding the title question: Categorically, no. In your case, not enough info, hence my comment and downvote. Also, IMO, questions that conflate statistical and practical significance have been done
|
43,793
|
Is statistical insignificance fatal?
|
As a Bayesian, I often find myself interpreting experiments as positive evidence for the null hypothesis. I would ask the following things:
It's a mean difference of \$2,000, but what is that in terms of a standardized mean difference?
How big of a (standardized) mean difference would you have expected to observe if this intervention worked?
How precise is your estimate? If the estimate is +\$2000 +/- \$20,000, then you have not learned much -- perhaps there's too much variability to know if your intervention worked.
Now that you have observed this seemingly null effect in a pretty healthy sample of 30,000, might it be time to argue that you know place less probability in the intervention being effective?
Many considerations apply, of course. If you are looking at p = .02 when your traditional cutoff is .01, it would be foolish to conclude that the null hypothesis is true, as the data are probably fairly equiprobable under the two hypotheses.
Thus, I would suggest looking at Zoltan Dienes' webpage and his Bayes Factor calculator. By specifying your parameter estimate, its precision, and a plausible range of parameter values if your intervention worked, you could get a Bayes Factor telling you whether this is evidence that your intervention works or doesn't work, or whether there is no evidence one way or the other.
Of course, the other commenters' replies are important, too: check your model, check your data, etc. to make sure the parameter estimate you have is appropriate.
|
Is statistical insignificance fatal?
|
As a Bayesian, I often find myself interpreting experiments as positive evidence for the null hypothesis. I would ask the following things:
It's a mean difference of \$2,000, but what is that in term
|
Is statistical insignificance fatal?
As a Bayesian, I often find myself interpreting experiments as positive evidence for the null hypothesis. I would ask the following things:
It's a mean difference of \$2,000, but what is that in terms of a standardized mean difference?
How big of a (standardized) mean difference would you have expected to observe if this intervention worked?
How precise is your estimate? If the estimate is +\$2000 +/- \$20,000, then you have not learned much -- perhaps there's too much variability to know if your intervention worked.
Now that you have observed this seemingly null effect in a pretty healthy sample of 30,000, might it be time to argue that you know place less probability in the intervention being effective?
Many considerations apply, of course. If you are looking at p = .02 when your traditional cutoff is .01, it would be foolish to conclude that the null hypothesis is true, as the data are probably fairly equiprobable under the two hypotheses.
Thus, I would suggest looking at Zoltan Dienes' webpage and his Bayes Factor calculator. By specifying your parameter estimate, its precision, and a plausible range of parameter values if your intervention worked, you could get a Bayes Factor telling you whether this is evidence that your intervention works or doesn't work, or whether there is no evidence one way or the other.
Of course, the other commenters' replies are important, too: check your model, check your data, etc. to make sure the parameter estimate you have is appropriate.
|
Is statistical insignificance fatal?
As a Bayesian, I often find myself interpreting experiments as positive evidence for the null hypothesis. I would ask the following things:
It's a mean difference of \$2,000, but what is that in term
|
43,794
|
Is statistical insignificance fatal?
|
Yes it's fatal for economic intervention. Whoever you demonstrate your results to, will look at the significance and declare that intervention didn't work.
This is provided that you tested for significance properly. For instance, the samples with or without intervention are similar in a reasonable way, or that the differences were controlled for etc. There are all kinds of biases to be introduced inadvertently in these experiments, so you have to account for them somehow.
|
Is statistical insignificance fatal?
|
Yes it's fatal for economic intervention. Whoever you demonstrate your results to, will look at the significance and declare that intervention didn't work.
This is provided that you tested for signif
|
Is statistical insignificance fatal?
Yes it's fatal for economic intervention. Whoever you demonstrate your results to, will look at the significance and declare that intervention didn't work.
This is provided that you tested for significance properly. For instance, the samples with or without intervention are similar in a reasonable way, or that the differences were controlled for etc. There are all kinds of biases to be introduced inadvertently in these experiments, so you have to account for them somehow.
|
Is statistical insignificance fatal?
Yes it's fatal for economic intervention. Whoever you demonstrate your results to, will look at the significance and declare that intervention didn't work.
This is provided that you tested for signif
|
43,795
|
Are the terms "event" and "outcome" synonymous?
|
Outcome and event are not synonymous.
Yes, an outcome is the result of a random experiment, like a rolling a die has six possible outcomes (say). However, an "event" is a set of outcomes to which a probability is assigned. One possible event is "rolling a number less than 3". See the Wikipedia page for probability theory and probability space for better descriptions.
|
Are the terms "event" and "outcome" synonymous?
|
Outcome and event are not synonymous.
Yes, an outcome is the result of a random experiment, like a rolling a die has six possible outcomes (say). However, an "event" is a set of outcomes to which a p
|
Are the terms "event" and "outcome" synonymous?
Outcome and event are not synonymous.
Yes, an outcome is the result of a random experiment, like a rolling a die has six possible outcomes (say). However, an "event" is a set of outcomes to which a probability is assigned. One possible event is "rolling a number less than 3". See the Wikipedia page for probability theory and probability space for better descriptions.
|
Are the terms "event" and "outcome" synonymous?
Outcome and event are not synonymous.
Yes, an outcome is the result of a random experiment, like a rolling a die has six possible outcomes (say). However, an "event" is a set of outcomes to which a p
|
43,796
|
Are the terms "event" and "outcome" synonymous?
|
I would say that an outcome is an elementary event (atomic event or simple event). A set of outcomes or elementary events is an event.
Check: http://en.wikipedia.org/wiki/Elementary_event
|
Are the terms "event" and "outcome" synonymous?
|
I would say that an outcome is an elementary event (atomic event or simple event). A set of outcomes or elementary events is an event.
Check: http://en.wikipedia.org/wiki/Elementary_event
|
Are the terms "event" and "outcome" synonymous?
I would say that an outcome is an elementary event (atomic event or simple event). A set of outcomes or elementary events is an event.
Check: http://en.wikipedia.org/wiki/Elementary_event
|
Are the terms "event" and "outcome" synonymous?
I would say that an outcome is an elementary event (atomic event or simple event). A set of outcomes or elementary events is an event.
Check: http://en.wikipedia.org/wiki/Elementary_event
|
43,797
|
Are the terms "event" and "outcome" synonymous?
|
I would like to cite a section from the Wikipedia article on Outcome, which I think well summarises the relation between these terms
Since individual outcomes may be of little practical interest, or because there may be prohibitively (even infinitely) many of them, outcomes are grouped into sets of outcomes that satisfy some condition, which are called "events". The collection of all such events is a sigma-algebra.
An event containing exactly one outcome is called an elementary event. The event that contains all possible outcomes of an experiment is its sample space. A single outcome can be a part of many different events.
Typically, when the sample space is finite, any subset of the sample space is an event (i.e. all elements of the power set of the sample space are defined as events). However, this approach does not work well in cases where the sample space is uncountably infinite (most notably when the outcome must be some real number). So, when defining a probability space it is possible, and often necessary, to exclude certain subsets of the sample space from being events.
|
Are the terms "event" and "outcome" synonymous?
|
I would like to cite a section from the Wikipedia article on Outcome, which I think well summarises the relation between these terms
Since individual outcomes may be of little practical interest, or
|
Are the terms "event" and "outcome" synonymous?
I would like to cite a section from the Wikipedia article on Outcome, which I think well summarises the relation between these terms
Since individual outcomes may be of little practical interest, or because there may be prohibitively (even infinitely) many of them, outcomes are grouped into sets of outcomes that satisfy some condition, which are called "events". The collection of all such events is a sigma-algebra.
An event containing exactly one outcome is called an elementary event. The event that contains all possible outcomes of an experiment is its sample space. A single outcome can be a part of many different events.
Typically, when the sample space is finite, any subset of the sample space is an event (i.e. all elements of the power set of the sample space are defined as events). However, this approach does not work well in cases where the sample space is uncountably infinite (most notably when the outcome must be some real number). So, when defining a probability space it is possible, and often necessary, to exclude certain subsets of the sample space from being events.
|
Are the terms "event" and "outcome" synonymous?
I would like to cite a section from the Wikipedia article on Outcome, which I think well summarises the relation between these terms
Since individual outcomes may be of little practical interest, or
|
43,798
|
Are the terms "event" and "outcome" synonymous?
|
Event is a subset of Outcomes in the Sample Space.
Possibly, a single result of an experiment too.
Lets say,
Experiment : Rolling a Die
Outcomes : S = {1,2,3,4,5,6}
Event : All positive numbered faces e = {2,4,6}
|
Are the terms "event" and "outcome" synonymous?
|
Event is a subset of Outcomes in the Sample Space.
Possibly, a single result of an experiment too.
Lets say,
Experiment : Rolling a Die
Outcomes : S = {1,2,3,4,5,6}
Event : All
|
Are the terms "event" and "outcome" synonymous?
Event is a subset of Outcomes in the Sample Space.
Possibly, a single result of an experiment too.
Lets say,
Experiment : Rolling a Die
Outcomes : S = {1,2,3,4,5,6}
Event : All positive numbered faces e = {2,4,6}
|
Are the terms "event" and "outcome" synonymous?
Event is a subset of Outcomes in the Sample Space.
Possibly, a single result of an experiment too.
Lets say,
Experiment : Rolling a Die
Outcomes : S = {1,2,3,4,5,6}
Event : All
|
43,799
|
Why is the normal distribution used in linear models, but in generalized linear models the exponential distribution is used?
|
In GLM's the exponential family of distributions (not the exponential distribution, https://en.wikipedia.org/wiki/Exponential_family) is used to model various outcomes, Gaussian (or normal) distribution for a real continuous variable, Gamma distribution for a real positive continuous variable, binomial distribution for a discrete variable, and so on.
An ordinary linear model is just one among the selection of distributions, which uses the normal distribution.
|
Why is the normal distribution used in linear models, but in generalized linear models the exponenti
|
In GLM's the exponential family of distributions (not the exponential distribution, https://en.wikipedia.org/wiki/Exponential_family) is used to model various outcomes, Gaussian (or normal) distributi
|
Why is the normal distribution used in linear models, but in generalized linear models the exponential distribution is used?
In GLM's the exponential family of distributions (not the exponential distribution, https://en.wikipedia.org/wiki/Exponential_family) is used to model various outcomes, Gaussian (or normal) distribution for a real continuous variable, Gamma distribution for a real positive continuous variable, binomial distribution for a discrete variable, and so on.
An ordinary linear model is just one among the selection of distributions, which uses the normal distribution.
|
Why is the normal distribution used in linear models, but in generalized linear models the exponenti
In GLM's the exponential family of distributions (not the exponential distribution, https://en.wikipedia.org/wiki/Exponential_family) is used to model various outcomes, Gaussian (or normal) distributi
|
43,800
|
Why is the normal distribution used in linear models, but in generalized linear models the exponential distribution is used?
|
An ordinary linear model -- which uses the normal distribution -- is just one GLM used for one purpose; other purposes suggest other distributions.
Not all generalised linear models (GLMs) use an exponential distribution.
Terminology is also confusing: "Exponential distribution" in the context of a statement like 'Generalised Linear Models use exponential distributions' means "one of the Exponential family of distributions, not "the exponential distribution.
GLMs use one of the exponential family of distributions to model various outcomes:
Use
Domain
Variable
Distribution
linear response
all reals
continuous
Gaussian (normal)
scale parameter
positive reals
continuous
Gamma
Binary outcome count
integers
discrete
Binomial
... and so on; see the GLM link function table on Wikipedia, for example.
|
Why is the normal distribution used in linear models, but in generalized linear models the exponenti
|
An ordinary linear model -- which uses the normal distribution -- is just one GLM used for one purpose; other purposes suggest other distributions.
Not all generalised linear models (GLMs) use an expo
|
Why is the normal distribution used in linear models, but in generalized linear models the exponential distribution is used?
An ordinary linear model -- which uses the normal distribution -- is just one GLM used for one purpose; other purposes suggest other distributions.
Not all generalised linear models (GLMs) use an exponential distribution.
Terminology is also confusing: "Exponential distribution" in the context of a statement like 'Generalised Linear Models use exponential distributions' means "one of the Exponential family of distributions, not "the exponential distribution.
GLMs use one of the exponential family of distributions to model various outcomes:
Use
Domain
Variable
Distribution
linear response
all reals
continuous
Gaussian (normal)
scale parameter
positive reals
continuous
Gamma
Binary outcome count
integers
discrete
Binomial
... and so on; see the GLM link function table on Wikipedia, for example.
|
Why is the normal distribution used in linear models, but in generalized linear models the exponenti
An ordinary linear model -- which uses the normal distribution -- is just one GLM used for one purpose; other purposes suggest other distributions.
Not all generalised linear models (GLMs) use an expo
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.