# Questions tagged [statistics]

{statistics} if for questions related to statistics software/graphics/packages and TeX.

81 questions
Filter by
Sorted by
Tagged with
54 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.
23 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 ...
56 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 ...
129 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}{% \...
481 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)...
68 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{...
437 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 ...
34 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 ...
43 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 ...
148 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 ...
61 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 ...
80 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} \...
137 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 ...
140 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 ...
131 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 ...
57 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 ...
692 views

### How to Display Conditional Probability in LyX?

I am looking for a way to show $P(\theta|X)$ but with the proper spacing?
322 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 ...
89 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!
69 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 ...
89 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 ...
456 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{...
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 ...
2k 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?
132 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.
58 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 ...
397 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 ...
175 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 ...
823 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. ...
284 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 ...
278 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 ...
670 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{...
317 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 ...
948 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 ...
415 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 ...
104 views

### Dimension too large for a boxplot with pgfplots

I can not display the tick marks on the x-axis. \starttikzpicture \startaxis[ y=1.5cm, axis y line=none, axis x line=bottom, enlarge x limits, ...
981 views

### “Undefined control sequence” Regression table from Stata

I am completely new to LaTeX. I work in the TeXworks editor. I would like to create regression tables with results from Stata for my master's thesis. Using the Stata command "esttab", I created a .tex ...
300 views

### notational conventions for statistics (like hypothesis test statistics) [closed]

I am wondering about something. I know I should write function non-italic. like sin and cos, But I am not sure if test statistic symbols like $T^2$ should be written italic (default) or with \mathrm. ...
1k views

### plot and annotate chi square distribution

My question is replacing Gaussian distribution with chi square distribution in following codes. So it should show a chi-square distribution instead of a normal distribution. Thanks in advance. \...
428 views

### PGFPlots Line of Best Fit Scale and Inversion Error

I am attempting to draw a linear regression line on my graph using pgfplotstable. However, for some reason, it appears to be calculating the regression three orders of magnitude too large and inverted,...
256 views

### Interval missing and extrange behavior in frequency polygon

I am preparing a material for students about Statistics and I have this generic-foo frequency polygon as an example, without the corresponding Histogram. I would like all intervals to be displayed in ...
323 views

### How to plot linear histograms with Latex? [duplicate]

I have been reviewing how to plot a line histogram on data of my results. I have searched and only see how to plot in bar histogram, but I have not seen any construction of one of lines in latex. I ...
476 views

### How do I create a weighted histogram from a data file using pgfplots?

There is already a question with a good answer on how to create a histogram from a data file: How to compute an histogram (plot bars) binning the values from a .csv using TeX? I am in a similar ...
529 views

### box plot statistic with 2 lines

I am trying to have a boxplot from data , with two lines and frequency in the second line. example: I don't know how to do it, with a "foreach " or special command for boxplot ( pgfplots ) \...
394 views

### How to add Statistical mode in an equation?

I need to include an equation that contain Statistical mode.I need to find the most repeated value in a set and also need to include range of that set.In the equation bellow,i am trying to replace max ...
2k views

### Including greek letters when saving matrix from R to .tex table

How does one save a table with Greek letters in R, so that LaTeX recognizes and outputs the Greek letters when the table is called in LaTeX ? I am using R to output a table of results, save the ...
4k views

### Personalizing esttab results - Stata and LaTeX [closed]

I am using Benn Jan's esttab command for Stata and combining the results with my draft LaTeX document, using the useful tips provided by Jörg Weber. I want to include some non-standard results in my ...
6k views

### Stata output directly to Latex

I am looking for a best, most universal option to transfer stata output to latex (of any kind) i know esttab and things like this however what if i want to transfer something different (any type of ...