Videos
[Q] To hat or not to hat?
math mode - Really wide hat symbol - TeX - LaTeX Stack Exchange
[Q] Why do we use x̄ as the symbol for sample mean?
Does "bar" and "hat" mean the same thing?
How do I find p-hat?
To find p-hat (i.e., sample proportion), you need to follow the next steps:
- Take the number of occurrences of an event or the number of successful outcomes.
- Divide it by the sample size.
- That's all! You have calculated p-hat.
What is the meaning of p-hat?
P-hat coveys the sample proportion, the ratio of certain events or characteristics occurring in a sample to the sample size. It can equal or differ from population proportion, which conveys a proportion of a particular feature associated with a population.
What does it mean if p-hat equals 0.6 in a political poll?
If p-hat equals 0.6 in a political poll, 60% of voters from the sample support a particular event or a candidate. P-hat is the ratio of the number of occurrences of a particular event to the sample size and is often reported as a percentage in polls.
I just had a discussion with a colleague regarding reporting of results from rank-order correlation using Spearman’s method, which yields ρ, or rho. Rho can be estimated from a bivariate association between two independent values measured in a sample. The sample is intended to represent the population it was sampled from - should or should not then the sample estimate be reported with a hat (ρ̂ )?
An alternative (and very simple) solution consists in using the package yhmath (which, as far as I was able to understand from its documentation, requires the amsmath package).
With such a package (i.e. the yhmath) a "really" wide hat can be obtained by simply using the very same command
\widehat{}
As a beginner in LaTeX, I find this other possibility a little bit more friendly.
The question wasn't "should it be done?" But, for the same reason men climb mountains, "could it be done?" The answer, with the scalerel package, is yes. Thus, we introduce \reallywidehat [EDITED to add phantom rule below argument, so that baseline of result matches baseline of original argument. RE-EDITED to \ensuremath on the \widthof calculation (thanks to Thruston)]
See also my answer at Serious problem with \widebar for a related approach.
NEW ANSWER WITH stackengine
This answer is an improvement because it handles vertical space much better than the earlier solution.
\documentclass{article}
\usepackage{scalerel,stackengine}
\stackMath
\newcommand\reallywidehat[1]{%
\savestack{\tmpbox}{\stretchto{%
\scaleto{%
\scalerel*[\widthof{\ensuremath{#1}}]{\kern-.6pt\bigwedge\kern-.6pt}%
{\rule[-\textheight/2]{1ex}{\textheight}}%WIDTH-LIMITED BIG WEDGE
}{\textheight}%
}{0.5ex}}%
\stackon[1pt]{#1}{\tmpbox}%
}
\parskip 1ex
\begin{document}
$\reallywidehat{zbcdefghijklm}$
$\reallywidehat{zbcdefghijk}$
$\reallywidehat{zbcdefghi}$
$\reallywidehat{zbcdefg}$
$\reallywidehat{zbcde}$
$\reallywidehat{zbc}$
$\reallywidehat{zb}$
$x\cdot\reallywidehat{a_1+a_2}\cdot y$
\end{document}
ALTERNATE ANSWER USING \mathchar"0362 (the \widehat accent) RATHER THAN \bigwedge
EDITED to use \mathchar"0362 rather than the normal carat accent (\mathchar"305E)
A comment requested this alternate form, which is perhaps superior to the given form above.
\documentclass{article}
\usepackage{scalerel,stackengine}
\stackMath
\newcommand\reallywidehat[1]{%
\savestack{\tmpbox}{\stretchto{%
\scaleto{%
\scalerel*[\widthof{\ensuremath{#1}}]{\kern.1pt\mathchar"0362\kern.1pt}%
{\rule{0ex}{\textheight}}%WIDTH-LIMITED CIRCUMFLEX
}{\textheight}%
}{2.4ex}}%
\stackon[-6.9pt]{#1}{\tmpbox}%
}
\parskip 1ex
\begin{document}
$\reallywidehat{zbcdefghijklm}$
$\reallywidehat{zbcdefghijk}$
$\reallywidehat{zbcdefghi}$
$\reallywidehat{zbcdefg}$
$\reallywidehat{zbcde}$
$\reallywidehat{zbc}$
$\reallywidehat{zb}$
$x\cdot\reallywidehat{a_1+a_2}\cdot y$
$\widehat{zb}$ is actual widehat
\end{document}
EARLIER ANSWER WITH array
\documentclass{article}
\usepackage{scalerel}
\newcommand\reallywidehat[1]{\arraycolsep=0pt\relax%
\begin{array}{c}
\stretchto{
\scaleto{
\scalerel*[\widthof{\ensuremath{#1}}]{\kern-.5pt\bigwedge\kern-.5pt}
{\rule[-\textheight/2]{1ex}{\textheight}} %WIDTH-LIMITED BIG WEDGE
}{\textheight} %
}{0.5ex}\\ % THIS SQUEEZES THE WEDGE TO 0.5ex HEIGHT
#1\\ % THIS STACKS THE WEDGE ATOP THE ARGUMENT
\rule{-1ex}{0ex}
\end{array}
}
\begin{document}
$\reallywidehat{zbcdefghijklm}$
$\reallywidehat{zbcdefghijk}$
$\reallywidehat{zbcdefghi}$
$\reallywidehat{zbcdefg}$
$\reallywidehat{zbcde}$
$\reallywidehat{zbc}$
$\reallywidehat{zb}$
$x\cdot\reallywidehat{a_1+a_2}\cdot y$
\end{document}