# Questions tagged [statistics]

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

102 questions
Filter by
Sorted by
Tagged with
6 views

### Using \boxplot calculated whisker values to sort outliers

I'm working on getting the \boxplot command from the 'statistics' package to calcualte the lower and upper whisker values of a data set read from a sinlge colum .txt file then use those whisker values ...
206 views

### How to calculate correlation from a table of data

This is not for the real statistic work... But I need this for simple statistics for students of 15 year of age. To interpretate simple correlation in combination of a scatterplot. (Exam questions). ...
• 4,673
44 views

### How to extract statistical data about citations in a section?

I'm writing a paper in which I need to plot some statistics about the references cited in one of its sections, e.g., the total number of citations grouped by the reference type. I'm using biblatex and ...
• 41
1 vote
45 views

### Plotting cdf of binomial distribution with pst-func

I found the amazing pst-func package for plotting various mathematical functions including the cdf of a binomial distribution. With XeLaTeX I can compile (for example in OVerleaf): % Requires XeLaTeX, ...
• 1,003
56 views

### How to remove ticks outside intervals ends

\documentclass[border=5pt]{standalone} \usepackage{statistics} \begin{document} \StatsRangeData \tips = { 15.95, 12.60, 20.75, 22.20, 8.80, 15.60, 19.50, 20.60, 24.15, 9.85, 11.80, 12.75, 15.40, ...
• 1,341
1 vote
90 views

### How do I insert blank leaves on a probability tree diagram using TikZ?

I have the below code that generates a basic probability tree. \documentclass{standalone} \usepackage{tikz} \begin{document} \begin{tikzpicture}[ grow=right, level distance=3cm, level 1/.style = {...
151 views

### How to do this double sum with a subscript in the middle? [duplicate]

This is How to do this double sum with a subscript in the middle?
1 vote
83 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. ...
79 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 ...
• 1,037
154 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 ...
44 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 ...
1k 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 ...
• 215
741 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 ...
24 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} \...
• 5,598
140 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.
• 61
1 vote
1k 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 ...
• 576
102 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 ...
• 580
162 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 ...
• 101
572 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{ &=\...
134 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 ...
• 399
244 views

### How do I get LaTeX to perform an exponential regression? [closed]

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}[...
• 21
1 vote
897 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
190 views

### Write an equation showing a condition indicating correlation between two variables [closed]

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 ...
• 111
647 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}{% \...
• 9,776
1 vote
2k views

### New command for Covariance not working [closed]

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)...
• 111
138 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
3k 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 ...
51 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 ...
• 349
1 vote
123 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 ...
• 8,912
442 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 ...
1 vote
295 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 ...
• 319
652 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} \...
• 221
338 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 ...
• 3,652
1 vote
413 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 ...
• 13
207 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 ...
• 101
85 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 ...
• 6,872
2k views

### How to Display Conditional Probability in LyX?

I am looking for a way to show $P(\theta|X)$ but with the proper spacing?
• 163
1k 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 ...
• 335
1 vote
314 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
99 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,869
247 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,062
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{...
• 3,778
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 ...
4k 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?
• 311
191 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.
209 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 ...
• 1,332
941 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 ...
• 623
1 vote
309 views

### pgfplots Histogram with Automatically Calculated Percentage Bins [closed]

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 ...
• 623
1 vote
2k 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. ...
• 623
1 vote