Code
ifr_os_t_test(hsb, write, mu = 50, alternative = "less")
Output
One-Sample Statistics
---------------------------------------------------------------------------------
Variable Obs Mean Std. Err. Std. Dev. [95% Conf. Interval]
---------------------------------------------------------------------------------
write 200 52.775 0.6702 9.4786 -Inf 53.8828
---------------------------------------------------------------------------------
Lower Tail Test
---------------
Ho: mean(write) >=50
Ha: mean(write) <50
--------------------------------------------------------------------------------
Variable t DF Sig Mean Diff. [95% Conf. Interval]
--------------------------------------------------------------------------------
write 4.141 199 0.99997 2.775 -Inf 3.8828
--------------------------------------------------------------------------------
Code
ifr_os_t_test(hsb, write, mu = 50, alternative = "greater")
Output
One-Sample Statistics
---------------------------------------------------------------------------------
Variable Obs Mean Std. Err. Std. Dev. [95% Conf. Interval]
---------------------------------------------------------------------------------
write 200 52.775 0.6702 9.4786 51.6678 Inf
---------------------------------------------------------------------------------
Upper Tail Test
---------------
Ho: mean(write) <=50
Ha: mean(write) >50
--------------------------------------------------------------------------------
Variable t DF Sig Mean Diff. [95% Conf. Interval]
--------------------------------------------------------------------------------
write 4.141 199 0.00003 2.775 1.6678 Inf
--------------------------------------------------------------------------------
Code
ifr_os_t_test(hsb, write, mu = 50, alternative = "both")
Output
One-Sample Statistics
---------------------------------------------------------------------------------
Variable Obs Mean Std. Err. Std. Dev. [95% Conf. Interval]
---------------------------------------------------------------------------------
write 200 52.775 0.6702 9.4786 51.4537 54.0969
---------------------------------------------------------------------------------
Two Tail Test
---------------
Ho: mean(write) ~=50
Ha: mean(write) !=50
--------------------------------------------------------------------------------
Variable t DF Sig Mean Diff. [95% Conf. Interval]
--------------------------------------------------------------------------------
write 4.141 199 0.00005 2.775 1.4537 4.0969
--------------------------------------------------------------------------------
Code
ifr_os_t_test(hsb, write, mu = 50, alternative = "all")
Output
One-Sample Statistics
---------------------------------------------------------------------------------
Variable Obs Mean Std. Err. Std. Dev. [95% Conf. Interval]
---------------------------------------------------------------------------------
write 200 52.775 0.6702 9.4786 51.4537 54.0969
---------------------------------------------------------------------------------
Ho: mean(write) ~=50
Ha: mean < 50 Ha: mean ~= 50 Ha: mean > 50
t = 4.141 t = 4.141 t = 4.141
P < t = 0.99997 P > |t| = 0.00005 P > t = 0.00003
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.