Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Lære Standardafvigelse med Python | Varians og Standardafvigelse
Lær Statistik med Python
course content

Kursusindhold

Lær Statistik med Python

Lær Statistik med Python

1. Grundlæggende Begreber
2. Gennemsnit, Median og Typetal med Python
3. Varians og Standardafvigelse
4. Kovarians vs Korrelation
5. Konfidensinterval
6. Statistisk Testning

book
Standardafvigelse med Python

Den første funktion er fra numpy, og den anden metode er fra pandas. Se eksemplet på beregning af standardafvigelsen for work_year:

123456789101112
import pandas as pd import numpy as np df = pd.read_csv('https://codefinity-content-media.s3.eu-west-1.amazonaws.com/a849660e-ddfa-4033-80a6-94a1b7772e23/update/ds_salaries_statistics', index_col = 0) # Calculate the standard deviation using the function from the NumPy library std_1 = np.std(df['salary_in_usd']) # Calculate the standard deviation using the function from the pandas library std_2 = df['salary_in_usd'].std() print('The standard deviation using NumPy library is', round(std_1, 2)) print('The standard deviation using pandas library is', round(std_2, 2))
copy
Var alt klart?

Hvordan kan vi forbedre det?

Tak for dine kommentarer!

Sektion 3. Kapitel 5

Spørg AI

expand
ChatGPT

Spørg om hvad som helst eller prøv et af de foreslåede spørgsmål for at starte vores chat

course content

Kursusindhold

Lær Statistik med Python

Lær Statistik med Python

1. Grundlæggende Begreber
2. Gennemsnit, Median og Typetal med Python
3. Varians og Standardafvigelse
4. Kovarians vs Korrelation
5. Konfidensinterval
6. Statistisk Testning

book
Standardafvigelse med Python

Den første funktion er fra numpy, og den anden metode er fra pandas. Se eksemplet på beregning af standardafvigelsen for work_year:

123456789101112
import pandas as pd import numpy as np df = pd.read_csv('https://codefinity-content-media.s3.eu-west-1.amazonaws.com/a849660e-ddfa-4033-80a6-94a1b7772e23/update/ds_salaries_statistics', index_col = 0) # Calculate the standard deviation using the function from the NumPy library std_1 = np.std(df['salary_in_usd']) # Calculate the standard deviation using the function from the pandas library std_2 = df['salary_in_usd'].std() print('The standard deviation using NumPy library is', round(std_1, 2)) print('The standard deviation using pandas library is', round(std_2, 2))
copy
Var alt klart?

Hvordan kan vi forbedre det?

Tak for dine kommentarer!

Sektion 3. Kapitel 5
Vi beklager, at noget gik galt. Hvad skete der?
some-alt