We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Basic Statistics Warmup
Basic Statistics Warmup
Sort by
recency
|
72 Discussions
|
Please Login in order to post a comment
Enter your code here. Read input from STDIN. Print output to STDOUT
import numpy as np import pandas as pd from functools import reduce from scipy.stats import norm
i = int(input()) l = input() ls = list(map(lambda x: int(x), l.split()))
def mean(ls, n): return reduce(lambda acc, cur : acc + cur, ls, 0) / n
def median(ls, n): ls_sort = ls ls_sort.sort() if n % 2 != 0: return ls_sort[int(n / 2)]
def mode(ls, n): keys = list(set(ls)) keys.sort() freq_el = {} for key in keys: freq_el[key] = 0
def std(ls, n): m = mean(ls, n) st = ((reduce(lambda acc, cur: acc + (cur - m)**2 , ls, 0)) / n)**0.5 return round(st, 1)
def Confidence_Interval(ls, n): m = mean(ls, n) st = std(ls, n) # z_score = norm.ppf(0.975) z_score = 1.96
print(mean(ls, i))
print(median(ls, i))
print(mode(ls, i))
print(std(ls, i)) print(*Confidence_Interval(ls, i))
We have built an enterprise ai platform - Centralized platform for quickly and securely deploying Generative & Classic AI in your enterprise. Choose from ready-to-deploy AI Applications, AI agents, build your own, or let us create tailored solutions for your enterprise needs. Empower your teams with AI-driven enterprise search and instant answers, no matter where your knowledge resides. OnDemand Console transforms the management of assets, devices, and networks through intuitive, conversational control. Manage any data—IoT, finance, business, and more—through natural language interactions. A completely dynamic UI that instantly generates widgets based on your natural language requests. You can ask for any graph, report, analytics, or prediction, and it’s presented to you instantly. No-learning-curve https://studiox-ai.com
The rounding was killing me
Also thew questions was 95% confidence interval, but we use 1.96???
Read on critical values