Quotes help make search much faster. Example: "Practice Makes Perfect"

Monday, September 9, 2019

Codecademy Learn Phaser: Basics Draw A Circle 2/12

//Sample Solution
function create() {
  let circle1 = this.add.circle(50, 100, 90, 0xFFF070);
  let circle2 = this.add.circle(95, 300, 80, 0xFF0000);
  let circle3 = this.add.circle(200, 200, 100, 0x9F00D0);
  let circle4 = this.add.circle(300, 400, 10, 0x00E030);

  // Add in a circle here!
  let circle5 = this.add.circle(450, 600, 240, 0xFFFFFF);
}

const config = {
type: Phaser.AUTO,
width: 450,
height: 600,
scene: {
    create
}
}

const game = new Phaser.Game(config)

Codecademy Learn Phaser: Basics Hello World 1/12

//Sample Solution
function create() {
  // Change "Codey's Adventures\n  in Code World" to the name of your game
  this.add.text(50, 100, "Nathan's Nation", { font: "40px Times New Roman", fill: "#ffa0d0"});

  // Change "by Codecademy" to your name!
  this.add.text(130, 300, "by nathan", { font: "20px Times New Roman", fill: "#ffa0d0"});
}

const config = {
type: Phaser.AUTO,
width: 450,
height: 600,
backgroundColor: "#5f2a55",
scene: {
    create
}
};

const game = new Phaser.Game(config);

Codecademy Hypothesis Testing With R ANOVA 13/14

#Sample Solution
---
title: "Hypothesis Testing in R"
output: html_notebook
---

```{r message = FALSE}
# load data
load("dist_one.Rda")
load("dist_two.Rda")
load("dist_three.Rda")
load("dist_four.Rda")
```

```{r}
# plot histograms and define not_normal here:
hist(dist_one)
hist(dist_two)
hist(dist_three)
hist(dist_four)
not_normal <- 4
```

```{r}
# define ratio here:
ratio <- sd(dist_two)/sd(dist_three)
ratio
```

Codecademy Hypothesis Testing With R ANOVA 12/14

#Sample Solution
---
title: "Hypothesis Testing in R"
output: html_notebook
---

```{r message = FALSE}
# load libraries
library(tidyr)
```

```{r message = FALSE}
# load data
load("stores.Rda")
load("stores_new.Rda")
```

```{r}
# inspect stores here:
stores
```

```{r}
# perform anova on stores here:
results = aov(sales ~ store, data = stores)
summary(results)
```

```{r}
# perform anova on stores_new here:
results_new = aov(sales ~ store, data = stores_new)
summary(results_new)
```

Codecademy Hypothesis Testing With R Dangers of Multiple T-Tests 11/14

#Sample Solution
---
title: "Hypothesis Testing in R"
output: html_notebook
---

```{r message = FALSE}
# load data
load("store_a.Rda")
load("store_b.Rda")
load("store_c.Rda")
```

```{r}
# calculate means here:
store_a_mean <- mean(store_a)
store_a_mean
store_b_mean <- mean(store_b)
store_b_mean
store_c_mean <- mean(store_c)
store_c_mean
```

```{r}
# calculate standard deviations here:
store_a_sd <- sd(store_a)
store_a_sd
store_b_sd <- sd(store_b)
store_b_sd
store_c_sd <- sd(store_c)
store_c_sd
```

```{r}
# perform two sample t-test here:
a_b_results <- t.test(store_a,store_b)
a_b_results
a_c_results <- t.test(store_a,store_c)
a_c_results
b_c_results <- t.test(store_b,store_c)
b_c_results
```

```{r}
# calculate error_prob here:
error_prob <- (1-(0.95**3))
error_prob
```

Codecademy Hypothesis Testing With R Two-Sample T-Test 10/14

#Sample Solution
---
title: "Hypothesis Testing in R"
output: html_notebook
---

```{r message = FALSE}
# load data
load("week_1.Rda")
week_1
load("week_2.Rda")
week_2
```

```{r}
# calculate week_1_mean and week_2_mean here:
week_1_mean <- mean(week_1)
week_1_mean
week_2_mean <- mean(week_2)
week_2_mean
```

```{r}
# calculate week_1_sd and week_2_sd here:
week_1_sd <- sd(week_1)
week_1_sd
week_2_sd <- sd(week_2)
week_2_sd
```

```{r}
# run two sample t-test here:
results <- t.test(week_1,week_2)
results
```

Codecademy Hypothesis Testing With R One-Sample T-Test 9/14

#Sample Solution
---
title: "Hypothesis Testing in R"
output: html_notebook
---

```{r message = FALSE}
# load and view data
load("ages.Rda")
ages
```

```{r}
# calculate ages_mean here:
ages_mean <- mean(ages)
ages_mean
```

```{r}
# perform t-test here:
results <- t.test(ages,mu=30)
results
```

This is an example of scrolling text using Javascript.

Popular Posts