 # Write a code in python or in any programming language: to call func...

## Question

Write a code in python or in any programming language: to call functions which will play the role of tables for z, t, chi-square and F distributions,namely, for z, write a code segment that will take:

(a) z0 as input and give P(z<z0) as output;
(b) alpha as input and give z0 as output where P(z<z0)=alpha. Same for the rest, except it will take degree(s) of freedom (dof) also as input.

(This part is related to sampling distributions of statistics, which should be implemented on personal computer.)

## Solution Preview

These solutions may offer step-by-step problem-solving explanations or good writing examples that include modern styles of formatting and construction of bibliographies out of text citations and references. Students may use these solutions for personal skill-building and practice. Unethical use is strictly forbidden.

import scipy.stats as st

ch = input("z or alpha: ")
dist = input("Select distribution: ")

if ch == "z":
#z0 = 10
z0 = float(input("Input z0: "))

if (dist == "z"):
print(f'P(z<{z0}) = {st.norm.cdf(z0)}')
elif (dist == "t"):
k = int(input("Degrees of freedom: "))
print(f'P(t_{k}<{z0}) = {st.t.cdf(z0,k)}')
elif (dist == "chisq"):
k = int(input("Degrees of freedom: "))
print(f'P(chisq_{k}<{z0}) = {st.chi2.cdf(z0, k)}')...

By purchasing this solution you'll be able to access the following files:
probs.py.

# 50% discount

Hours
Minutes
Seconds
\$18.00 \$9.00
for this solution

or FREE if you
register a new account!

PayPal, G Pay, ApplePay, Amazon Pay, and all major credit cards accepted.

### Find A Tutor

View available Python Programming Tutors

Get College Homework Help.

Are you sure you don't want to upload any files?

Fast tutor response requires as much info as possible.