Add PHP to your head

// Add scripts to wp_head()
function child_theme_head_script() {

    // Your PHP goes here

}
add_action( 'wp_head', 'child_theme_head_script' );

OR

Add HTML to your head

// Add scripts to wp_head()
function child_theme_head_script() {

    echo "Your HTML goes here";

}
add_action( 'wp_head', 'child_theme_head_script' );

Code added to wp_head() will be ran just before the closing </head> tag.