Solve Quick Mathematica Issue with HypothesisTesting

  • Mathematica
  • Thread starter HJ Farnsworth
  • Start date
  • Tags
    Mathematica
In summary, the conversation discusses a method to obtain a number output from a Mathematica function in the form "variable→number". The solution involves defining a function to de-reference the output.
  • #1
HJ Farnsworth
128
1
Greetings,

I have a nagging issue that keeps annoying me in Mathematica.

If a Mathematica function outputs a number I want in the form "variable→number", is there a function I could use or something simple I could type to get the number itself, rather than in the Root[variable, number] form?

Here's an example. I type:

Needs["HypothesisTesting`"]
a=NormalPValue[-2]

and Mathematica outputs:

OneSidedPValue → .0227501

I'm looking for a function f where, if I type:

f[a]

Then Mathematica will output:

.0227501

Thanks for any help you can give.

-HJ Farnsworth
 
Physics news on Phys.org
  • #2
You need to de-reference it:

Needs["HypothesisTesting`"]
a = NormalPValue[-2]

myf[t_] := OneSidedPValue /. NormalPValue[t]
 
  • #3
That worked, thank you.

-HJ Farnsworth
 

Related to Solve Quick Mathematica Issue with HypothesisTesting

What is Mathematica?

Mathematica is a computational software program used by scientists, engineers, and mathematicians for data analysis, mathematical modeling, and visualization.

What is Hypothesis Testing?

Hypothesis testing is a statistical method used to determine whether a hypothesis about a population is supported by the data or not. It involves setting up a null hypothesis and an alternative hypothesis, collecting data, and using statistical tests to determine the likelihood of the null hypothesis being true.

What is a Quick Mathematica Issue?

A quick Mathematica issue can refer to a problem or error encountered while using the Mathematica software. It can also refer to a task that needs to be completed quickly in Mathematica, such as performing a statistical analysis or data visualization.

How can I use Mathematica for Hypothesis Testing?

Mathematica has built-in functions and packages for performing various types of statistical analyses, including hypothesis testing. You can use these functions to input your data and perform the necessary tests to determine the validity of your hypothesis.

What are some common issues when performing Hypothesis Testing in Mathematica?

Some common issues when performing Hypothesis Testing in Mathematica may include incorrect data input, choosing the wrong statistical test, or not setting up the null and alternative hypotheses correctly. It is important to carefully review your data and the steps involved in the hypothesis testing process to avoid these issues.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
2K
  • Programming and Computer Science
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
6
Views
7K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
12
Views
4K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
22
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
4K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
5K
Back
Top