Questions tagged [statistics]
{statistics} if for questions related to statistics software/graphics/packages and TeX.
97
questions
1
vote
0
answers
42
views
Figures on the number of LaTeX users [closed]
I am looking for figures on the number of academics using Tex or LaTeX.
How may people use LaTeX?
LaTeX is a computer language used to produce pdfs and make books. It is popular across STEM fields.
...
0
votes
1
answer
47
views
Stacked bar chart from data table, formatting of point meta
I've got a data table with multiple y values per x that I have arranged as a stacked bar chart. It seems that pgfplots can calculate percentages from absolute values, but I calculated the percentages ...
0
votes
0
answers
41
views
Different values and lengths of variables for Descriptive Statistics
I have recently been given advice how to handle descriptive statistics in Latex. However, I have still problems with my descriptive statistics since my variables differ in their values and lengths, e....
0
votes
1
answer
79
views
Displaying moderator analysis with 3 variables with LaTeX
i found how to do a mediation here : Displaying mediator analysis with LaTeX (TikZ-pfg maybe?)
but i don't manage to transform it to a moderation like this :
I'd like to keep the possibility to put ...
0
votes
0
answers
31
views
Creating a "data-dump" table procedurally?
I have a ~50 sample dataset I'd like to put into a table. Because there's only one variable to display, a single column chart looks ridiculous and wastes a lot of space. Is there a way I can get it to ...
3
votes
1
answer
402
views
What are good ways to convert SQL query results into a LaTeX table?
Background
I'm doing some data analysis on a large dataset on a local SQL server. A substantial proportion of that analysis is tabular stuff: frequency tables and the like which summarize various ...
0
votes
1
answer
274
views
Making a frequency distribution using intervals
I am trying to get help with a statistics problem. It is not advanced by any means and I know very well how to solve it. I just happened to stumble across LaTeX and got interested in learning how to ...
2
votes
0
answers
23
views
Why pgfplots's histogram vertical axis magnitude in %? [duplicate]
According to example from manual for pgfplots (page 512), the default behaviour of hist={density} is a plot
My MWE result y-axis magnitude realize in % (not in per-one). Why?
\documentclass{article}
\...
0
votes
3
answers
111
views
How can I write the weibull probability formula?
I would be very grateful if you could help me on how to write this formula.
1
vote
1
answer
488
views
How do I make a table to represent a discrete probability distribution?
I have a discrete probability distribution p(x) with the support ${\mathcal {X}} = {0,1,2,3,4,5,6,7,8,9}$ and I'd like to represent the distribution in the form of a table, similar to the one below
...
1
vote
0
answers
59
views
semilogx histogram with log-spaced bins in pgfplots
Is it possible to make a histogram in PGFPlots on a logarithmic x-axis, with equal-sized (in log space) bins? Just using semilogxaxis and hist fails as expected. Apparently there is no way to specify ...
0
votes
0
answers
96
views
Statistics in TexShop does not count words in tables
I am finished with a scientific paper for a conference, but it does not contain the requested 7000 words. For this reason I have changed my figures with a lot of text into tables.
The statistics under ...
3
votes
3
answers
324
views
Align environment end {align*} error
I have an issue to run the following code in an align environment:
\begin{align*}
&\mathrm{
E(Y_i|D_i=1)-E(Y_i|D_i=0)&=E(Y_{1i}|D_i=1)-E(Y_{0i}|D_i=0)
}\\
\mathrm{
&=\...
0
votes
1
answer
76
views
How to represent small numbers in academic writing?
I am seeking some suggestions through this query. In case this is not the right forum, kindly suggest where I may get an answer?
I need to represent small numbers in multiple tables meant for ...
2
votes
0
answers
158
views
How do I get LaTeX to perform an exponential regression?
I have been trying to get some regressions for my estimates, but there seems to be only content on polynomial and linear regression. This is the code I use for linear:
\begin{center}
\begin{figure}[...
1
vote
1
answer
452
views
Question on writing symbols (~, tilde)
I was wondering if anyone can show me how to write ~ in Latex as I am new to Latex and trying to write my statistics notes in a neat format. I've surfed around the web, but could not find it.
1
vote
0
answers
108
views
Write an equation showing a condition indicating correlation between two variables
I am trying to write this conditional equation:
I am not sure what could be the mathematical syntax for saying:
"variables x and y are correlated".
While searching for this, I came to know ...
1
vote
0
answers
67
views
``Plain Vanilla'' Statistical Images with LaTeX
I am looking to produce some very basic (nothing fancy), easily modifiable, statistical images for illustrative purposes in Latex. Such as these:
Although it may not be clear from the images, there ...
3
votes
1
answer
340
views
The Simplest Way to Produce the Standard Normal Distribution with Shading and Key Information Displayed
I would like to replicate
I have spent some time searching this site to find LaTeX code for producing a normal distribution that I can modify. But many use
\pgfmathdeclarefunction{gauss}{2}{%
\...
1
vote
0
answers
2k
views
New command for Covariance not working
I am trying to use \newcommand for \mathrm{Cov} but in my output I am not getting the symbol for Covariance as I wanted.
My LaTeX code:
$\newcommand{\Cov}{\mathrm{Cov}}$
\begin{align*}
A\Cov(X_1,Y)...
2
votes
2
answers
111
views
Why does loading multiple pgfplotslibraries in the same command sometime break the libraries?
I'm making some boxplots with the pgf statistics library. And I found the following.
This:
\documentclass{standalone}
\usepackage[T1]{fontenc}
\usepackage{fontspec}
\usepackage{tikz}
\usepackage{...
1
vote
2
answers
2k
views
Write notes under tables generated with stargazer
I created these descriptive statistics table using the ``stargazer" package, in RStudio and I would like to write a note under this table, but I am not able to. The only thing I could do was a ...
0
votes
0
answers
49
views
Print some document's statistics in preamble (eg. nb. of pages for each section)?
I'm searching for a way to get then print some statistics of my PhD thesis pdfLaTeX document in order to give some practical data to my supervisors on my writing progress (and also to help me get a ...
1
vote
1
answer
98
views
pgfplots: line sharp plot histogram - value is missing and values too much
I have values
1 2 2 3 3 4 4 4 4 5 5 5 6 6
and want that to plot as a line sharp plot histogram.
So, I set:
hist={
handler/.style={sharp plot},
intervals=false,
},
But he does not want to show the 2 ...
3
votes
2
answers
312
views
Statistics Table too large [duplicate]
I would like to display some statistics and difference in means by treatment arm on a single table. The data is exported from stata. I would like to allocate more space to the first column with the ...
0
votes
0
answers
176
views
Plotting cdf of a binomial distribution in tikz/pdfplot
I have been trying to plot the cdf (commulative density function) of a binomial distribution - in the easiest way possible (is there a package i could use?)
I would be glad if somebody already ...
2
votes
1
answer
285
views
Calculate percentage of quotes in a latex document?
I need to figure out how many percent of the text in my latex document which consists of quotes (in block quotes, particularly). I have wrapped all quotes in the block quotes command:
\begin{quote}
\...
7
votes
1
answer
213
views
3D normal diffusion with a drift
Based on 3D normal diffusion I want to draw the idea the normal distribution is flattening over time, but with a drift.
1 - As you can see in MWE below, the orange normal distribution seems to be cut ...
1
vote
1
answer
300
views
median calculation in boxplots
When I try to output the median value of a dataset with \pgfplotsboxplotvalue{median}} in a boxplot, the computed value is not the actual median (see below: 2.5 instead of 3). Is there a way to fix ...
0
votes
0
answers
175
views
Typesetting a five-number summary
I have used a command to typeset a three- or five-number summary in LaTeX, but I can't remember the package name nor find it searching with Google or on StackExchange. Can you tell me the name of the ...
2
votes
1
answer
72
views
Counting values by a 0.5 step before drawing an histogram
In this question, I asked how to draw an histogram showing the repartition of the marks of my students.
In the following example, I would like a have a more precise picture:
a bar for student whose ...
3
votes
1
answer
1k
views
How to Display Conditional Probability in LyX?
I am looking for a way to show $P(\theta|X)$ but with the proper spacing?
4
votes
1
answer
743
views
Dot and whisker plot in PGFplots
Sometimes it is useful to present the coefficients of a regression with accompanying confidence intervals as a dot-and-whisker plot. See here for a motivation of this approach and some examples of ...
1
vote
1
answer
243
views
how to draw CDF function for Poisson law tikz
Does anyone know how to draw the Cumulative distribution function of Poisson Distribution (explained here) in tikzpicture environment? I tried with cumulative sums... without success. Many thanks!
1
vote
0
answers
96
views
pgfplots boxplot without outliers, but with extrema [duplicate]
In response to this question asking about how pgfplots boxplots can be produced without outliers, this answer suggested a fix that does not seem to work anymore. (I am not the first to notice this as ...
2
votes
1
answer
199
views
Fiddling with Box plot using statistics library
For anyone who is experienced with the statistics package please give me some tips on how to achieve the following:
1. shaded in the box with gray!30
2. move the whole boxplot up by 0.25 unit so it is ...
2
votes
1
answer
1k
views
pgfplots: How to draw boxplot pairs separated in two y axis?
The user Korijn has posted a nice approach on how to create pairs of boxplots which are belonging to each other.
Minimum Working Example (MWE):
\documentclass[border=2mm]{standalone}
\usepackage{...
0
votes
0
answers
29
views
Table does not use entire space of page! [duplicate]
My table cannot fit on one page.
If I could only split the table up over two pages or maybe make it start in the very top of the page instead of beginning the table in like the middle of the page then ...
6
votes
2
answers
3k
views
What font is "z" in "z-score"?
I noticed that the letter z is different from other font. Is there any special command for this?
-1
votes
1
answer
174
views
Normal multivariate standard TIKZ [closed]
I need to perform this graph in TIKZ, there is no need to be equal, it is to be approximated.
0
votes
1
answer
161
views
Lines of code counter
Is there a way to automatically count the lines of code of a TeX document? And if yes, is there a way to include that in the document?
I would like to have something like "this document is n lines of ...
2
votes
0
answers
717
views
pgfplots Histogram with Curves [closed]
Variations on this question have been asked many times before, but I have not been able to find a working solution. The closest I have seen are discussions on other stackexchanges concerning how to ...
1
vote
0
answers
263
views
pgfplots Histogram with Automatically Calculated Percentage Bins
I have a CSV file. The CSV file contains several columns.
I want to plot a histogram that displays:
As the x axis: bins for the percentage of rows, that can be changed;
As the y axis: the cell ...
1
vote
1
answer
1k
views
pgfplots Line Histogram
I have a histogram. It is created from data in a CSV file.
I would like to connect the mid points on each bar with a smooth line.
My intention is to plot multiple series and show just the lines.
...
1
vote
1
answer
432
views
pgfplots Histogram with Normal Curve
Variations on this question have been asked multiple times before, but I have been unsuccessful in getting them to work. I may be (and most likely am) just inept at statistics.
I wish to plot a ...
1
vote
1
answer
426
views
Combine boxplot and histogram in one diagram (PGF/TikZ)
For my bachelor thesis I did a questionnaire, now I want to evaluate and visualise it in a diagram, combining multiple values. Most of the answers from this survey are in a scale of 1-5 or 1-6. I want ...
9
votes
1
answer
944
views
Brownian motion, normal distribution (3D)
Following a previous question, this representation that might be even more pedagogic in 3D. Based on this working example extracted from This post
\documentclass[border=5mm]{standalone}
\usepackage{...
2
votes
1
answer
391
views
How to properly draw a histogram?
Surely it is an easy problem but I can't find a solution. Imagine you want to simulate a Gaussian distribution of frequencies around a mean value with a certain spread. It is an easy task to write the ...
0
votes
1
answer
1k
views
Cannot find package stata.sty [duplicate]
I am using the command texdoc on stata to generate LaTex code. However, whenever I try running the code using pdfLaTex on TexWorks, I get an error saying that the package stata.sty could not be found ...
0
votes
1
answer
686
views
Include average in boxplot
I would like to include an average into my boxplots. The boxplots are made using https://tex.stackexchange.com/a/183856/164280 as an example. I have seen in How to show the mean or average value on a ...