tstat
Student's t mean and variance
Syntax
Description
Examples
Compute the mean and variance for Student's t distribution with degrees of freedom nu equal to 1 to 30.
nu = reshape(1:30,6,5); [m,v] = tstat(nu)
m = 6×5
NaN 0 0 0 0
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0
v = 6×5
NaN 1.4000 1.1818 1.1176 1.0870
NaN 1.3333 1.1667 1.1111 1.0833
3.0000 1.2857 1.1538 1.1053 1.0800
2.0000 1.2500 1.1429 1.1000 1.0769
1.6667 1.2222 1.1333 1.0952 1.0741
1.5000 1.2000 1.1250 1.0909 1.0714
Note that the mean is undefined for 1 degree of freedom, and variance is undefined for 1 and 2 degrees of freedom.
Input Arguments
Degrees of freedom for the Student's t distribution, specified as a positive scalar value or an array of positive scalar values.
Example: [9,19,49,99]
Data Types: single | double
Output Arguments
Mean of the Student's t distribution with the degrees of freedom
specified in nu, returned as a scalar value or an array of scalar
values. m is the same size as nu.
Variance of the Student's t distribution with the degrees of
freedom specified in nu, returned as a scalar value or an array of
scalar values. v is the same size as
nu.
More About
The parameters of the Student's t distribution depend on the degrees of freedom.
The mean of the Student’s t distribution is μ = 0 for degrees of freedom ν greater than 1. If ν equals 1, then the mean is undefined.
The variance of the Student’s t distribution is for degrees of freedom ν greater than 2. If ν is less than or equal to 2, then the variance is undefined.
For more information, see Student's t Distribution.
Extended Capabilities
C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.
This function fully supports GPU arrays. For more information, see Run MATLAB Functions on a GPU (Parallel Computing Toolbox).
Version History
Introduced before R2006a
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Website auswählen
Wählen Sie eine Website aus, um übersetzte Inhalte (sofern verfügbar) sowie lokale Veranstaltungen und Angebote anzuzeigen. Auf der Grundlage Ihres Standorts empfehlen wir Ihnen die folgende Auswahl: .
Sie können auch eine Website aus der folgenden Liste auswählen:
So erhalten Sie die bestmögliche Leistung auf der Website
Wählen Sie für die bestmögliche Website-Leistung die Website für China (auf Chinesisch oder Englisch). Andere landesspezifische Websites von MathWorks sind für Besuche von Ihrem Standort aus nicht optimiert.
Amerika
- América Latina (Español)
- Canada (English)
- United States (English)
Europa
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)