Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Finding P-Value

I am being asked to reproduce a calculation from SQL and have run into a SQL command VPAR which finds the P-Value of a set of numbers. P-Value is supposed to indicate statistical significance, but I cannot find any reference that can help me in Qlikview, nor can I figure out how to calculate the P-Value in general. Does anybody have any clue how to accomplish this? Here is the code I am attempting to reproduce:

SELECT AVG(quantity) AvgQuantity,
(Avg(date * quantity) - Avg(date) * Avg(quantity)) / VarP(date) AS Slope,
power(((1 / (VarP(date) * (Count(date) - 2))) * (VarP(quantity) - power((Avg(date * quantity) - Avg(date) * Avg(quantity)), 2) / VarP(date))), 0.5) AS SE_Slope into #stats
FROM #data

Thanks,

Aaron

2 Replies
Not applicable
Author

Here it is:

sum(aggr(pow(fabs(Value - avg(total Value)), 2), Value))/count(Value)


See example in attachment

sundarakumar
Specialist II
Specialist II

I know its too late 😄 still adding so that it will be useful for others 🙂

TTest_sig()  actually gives you the P value. and it always gives you for two tailed. you can just divide it by 2 to get the equivalent one tail number.